{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "301cd314",
   "metadata": {},
   "source": [
    "### 1.拿到文本doc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "c29ec30a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from tqdm import tqdm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0cf0b78f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>标引</th>\n",
       "      <th>TI 文献标题</th>\n",
       "      <th>预处理文本</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>Sensor terminal \"Portable\" for intelligent nav...</td>\n",
       "      <td>sensor terminal portable intelligent navigatio...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1.0</td>\n",
       "      <td>A Mobile Robot Tracking using Kalman Filter-ba...</td>\n",
       "      <td>mobile robot track kalman filter-based gaussia...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Global and Local Path Planning on Robotic Whee...</td>\n",
       "      <td>global local path planning robotic wheelchair ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>2.0</td>\n",
       "      <td>Whisker sensor design for three dimensional po...</td>\n",
       "      <td>whisker sensor design dimensional position mea...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>2.0</td>\n",
       "      <td>Applying Deep Reinforcement Learning to Cable ...</td>\n",
       "      <td>apply deep reinforcement learn cable drive par...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   编号   标引                                            TI 文献标题  \\\n",
       "0   1  2.0  Sensor terminal \"Portable\" for intelligent nav...   \n",
       "1   2  1.0  A Mobile Robot Tracking using Kalman Filter-ba...   \n",
       "2   3  NaN  Global and Local Path Planning on Robotic Whee...   \n",
       "3   4  2.0  Whisker sensor design for three dimensional po...   \n",
       "4   5  2.0  Applying Deep Reinforcement Learning to Cable ...   \n",
       "\n",
       "                                               预处理文本  \n",
       "0  sensor terminal portable intelligent navigatio...  \n",
       "1  mobile robot track kalman filter-based gaussia...  \n",
       "2  global local path planning robotic wheelchair ...  \n",
       "3  whisker sensor design dimensional position mea...  \n",
       "4  apply deep reinforcement learn cable drive par...  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 预处理过的标题摘要\n",
    "df = pd.read_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\论文\\2预处理.xlsx')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "71369c55",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(21758, 4)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8ec2fc41",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "e8d14f4a",
   "metadata": {},
   "outputs": [],
   "source": [
    "data = pd.read_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\分类结果\\论文-分类为1-原始标记为1.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "062373b8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(10840, 79)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>标引</th>\n",
       "      <th>TI 文献标题</th>\n",
       "      <th>编号.1</th>\n",
       "      <th>PT 出版物类型</th>\n",
       "      <th>AU 作者</th>\n",
       "      <th>BA 书籍作者</th>\n",
       "      <th>BE 书籍编者</th>\n",
       "      <th>GP 团体作者</th>\n",
       "      <th>AF 作者全名</th>\n",
       "      <th>...</th>\n",
       "      <th>WC Web of Science 主题类别</th>\n",
       "      <th>WE Web of Science 索引</th>\n",
       "      <th>SC 研究方向</th>\n",
       "      <th>GA IDS 编号</th>\n",
       "      <th>PM PubMedID</th>\n",
       "      <th>OA 公开访问名称</th>\n",
       "      <th>HC 高被引状态</th>\n",
       "      <th>HP 热门论文状态</th>\n",
       "      <th>DA 导出日期</th>\n",
       "      <th>UT 入藏号</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>14044</td>\n",
       "      <td>1</td>\n",
       "      <td>Path Planning of Cooperating Industrial Robots...</td>\n",
       "      <td>14044</td>\n",
       "      <td>C</td>\n",
       "      <td>Larsen, L; Schuster, A; Kim, J; Kupke, M</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Sormaz, D; Suer, G; Chen, FF</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Larsen, Lars; Schuster, Alfons; Kim, Jonghwa; ...</td>\n",
       "      <td>...</td>\n",
       "      <td>Computer Science, Artificial Intelligence; Eng...</td>\n",
       "      <td>Conference Proceedings Citation Index - Scienc...</td>\n",
       "      <td>Computer Science; Engineering</td>\n",
       "      <td>BM9JO</td>\n",
       "      <td>NaN</td>\n",
       "      <td>gold, Green Published</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2023-03-29 00:00:00</td>\n",
       "      <td>WOS:000471035200036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20986</td>\n",
       "      <td>1</td>\n",
       "      <td>A New Method to Solve the Kinematic Problems o...</td>\n",
       "      <td>20986</td>\n",
       "      <td>J</td>\n",
       "      <td>Trang, TT; Li, WG; Pham, TL</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Thanh Trung Trang; Li, Wei Guang; Thanh Long Pham</td>\n",
       "      <td>...</td>\n",
       "      <td>Robotics</td>\n",
       "      <td>Emerging Sources Citation Index (ESCI)</td>\n",
       "      <td>Robotics</td>\n",
       "      <td>EJ8DJ</td>\n",
       "      <td>NaN</td>\n",
       "      <td>gold</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2023-03-29 00:00:00</td>\n",
       "      <td>WOS:000393454800018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8793</td>\n",
       "      <td>1</td>\n",
       "      <td>System Dynamics Modeling of the Fffects of the...</td>\n",
       "      <td>8793</td>\n",
       "      <td>C</td>\n",
       "      <td>Elizondo-Noriega, A; Tiruvengadam, N; Guemes-C...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Kocaoglu, DF; Anderson, TR; Kozanoglu, DC; Niw...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Elizondo-Noriega, A.; Tiruvengadam, N.; Guemes...</td>\n",
       "      <td>...</td>\n",
       "      <td>Engineering, Electrical &amp; Electronic</td>\n",
       "      <td>Conference Proceedings Citation Index - Scienc...</td>\n",
       "      <td>Engineering</td>\n",
       "      <td>BO5RJ</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2023-03-29 00:00:00</td>\n",
       "      <td>WOS:000518681200118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18064</td>\n",
       "      <td>1</td>\n",
       "      <td>Obstacle Avoidance Strategy of Mobile Robot Ba...</td>\n",
       "      <td>18064</td>\n",
       "      <td>J</td>\n",
       "      <td>Peng, A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Peng, An</td>\n",
       "      <td>...</td>\n",
       "      <td>Computer Science, Interdisciplinary Applications</td>\n",
       "      <td>Emerging Sources Citation Index (ESCI)</td>\n",
       "      <td>Computer Science</td>\n",
       "      <td>EK8HK</td>\n",
       "      <td>NaN</td>\n",
       "      <td>gold</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2023-03-29 00:00:00</td>\n",
       "      <td>WOS:000394164300002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21361</td>\n",
       "      <td>1</td>\n",
       "      <td>Statics Modeling of an Underactuated Wire-Driv...</td>\n",
       "      <td>21361</td>\n",
       "      <td>C</td>\n",
       "      <td>Li, Z; Du, RX; Yu, HY; Ren, HL</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IEEE</td>\n",
       "      <td>Li, Zheng; Du, Ruxu; Yu, Haoyong; Ren, Hongliang</td>\n",
       "      <td>...</td>\n",
       "      <td>Engineering, Biomedical; Robotics</td>\n",
       "      <td>Conference Proceedings Citation Index - Scienc...</td>\n",
       "      <td>Engineering; Robotics</td>\n",
       "      <td>BG8WJ</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2023-03-29 00:00:00</td>\n",
       "      <td>WOS:000392740800056</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 79 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      编号  标引                                            TI 文献标题   编号.1  \\\n",
       "0  14044   1  Path Planning of Cooperating Industrial Robots...  14044   \n",
       "1  20986   1  A New Method to Solve the Kinematic Problems o...  20986   \n",
       "2   8793   1  System Dynamics Modeling of the Fffects of the...   8793   \n",
       "3  18064   1  Obstacle Avoidance Strategy of Mobile Robot Ba...  18064   \n",
       "4  21361   1  Statics Modeling of an Underactuated Wire-Driv...  21361   \n",
       "\n",
       "  PT 出版物类型                                              AU 作者 BA 书籍作者  \\\n",
       "0        C           Larsen, L; Schuster, A; Kim, J; Kupke, M     NaN   \n",
       "1        J                        Trang, TT; Li, WG; Pham, TL     NaN   \n",
       "2        C  Elizondo-Noriega, A; Tiruvengadam, N; Guemes-C...     NaN   \n",
       "3        J                                            Peng, A     NaN   \n",
       "4        C                     Li, Z; Du, RX; Yu, HY; Ren, HL     NaN   \n",
       "\n",
       "                                             BE 书籍编者 GP 团体作者  \\\n",
       "0                       Sormaz, D; Suer, G; Chen, FF     NaN   \n",
       "1                                                NaN     NaN   \n",
       "2  Kocaoglu, DF; Anderson, TR; Kozanoglu, DC; Niw...     NaN   \n",
       "3                                                NaN     NaN   \n",
       "4                                                NaN    IEEE   \n",
       "\n",
       "                                             AF 作者全名  ...  \\\n",
       "0  Larsen, Lars; Schuster, Alfons; Kim, Jonghwa; ...  ...   \n",
       "1  Thanh Trung Trang; Li, Wei Guang; Thanh Long Pham  ...   \n",
       "2  Elizondo-Noriega, A.; Tiruvengadam, N.; Guemes...  ...   \n",
       "3                                           Peng, An  ...   \n",
       "4   Li, Zheng; Du, Ruxu; Yu, Haoyong; Ren, Hongliang  ...   \n",
       "\n",
       "                              WC Web of Science 主题类别  \\\n",
       "0  Computer Science, Artificial Intelligence; Eng...   \n",
       "1                                           Robotics   \n",
       "2               Engineering, Electrical & Electronic   \n",
       "3   Computer Science, Interdisciplinary Applications   \n",
       "4                  Engineering, Biomedical; Robotics   \n",
       "\n",
       "                                WE Web of Science 索引  \\\n",
       "0  Conference Proceedings Citation Index - Scienc...   \n",
       "1             Emerging Sources Citation Index (ESCI)   \n",
       "2  Conference Proceedings Citation Index - Scienc...   \n",
       "3             Emerging Sources Citation Index (ESCI)   \n",
       "4  Conference Proceedings Citation Index - Scienc...   \n",
       "\n",
       "                         SC 研究方向  GA IDS 编号 PM PubMedID  \\\n",
       "0  Computer Science; Engineering      BM9JO         NaN   \n",
       "1                       Robotics      EJ8DJ         NaN   \n",
       "2                    Engineering      BO5RJ         NaN   \n",
       "3               Computer Science      EK8HK         NaN   \n",
       "4          Engineering; Robotics      BG8WJ         NaN   \n",
       "\n",
       "               OA 公开访问名称  HC 高被引状态 HP 热门论文状态              DA 导出日期  \\\n",
       "0  gold, Green Published       NaN       NaN  2023-03-29 00:00:00   \n",
       "1                   gold       NaN       NaN  2023-03-29 00:00:00   \n",
       "2                    NaN       NaN       NaN  2023-03-29 00:00:00   \n",
       "3                   gold       NaN       NaN  2023-03-29 00:00:00   \n",
       "4                    NaN       NaN       NaN  2023-03-29 00:00:00   \n",
       "\n",
       "                UT 入藏号  \n",
       "0  WOS:000471035200036  \n",
       "1  WOS:000393454800018  \n",
       "2  WOS:000518681200118  \n",
       "3  WOS:000394164300002  \n",
       "4  WOS:000392740800056  \n",
       "\n",
       "[5 rows x 79 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print(data.shape)\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "15649316",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([14044, 20986,  8793, ..., 21753, 21755, 21756], dtype=int64)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bianhao = data['编号'].values\n",
    "bianhao"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e1380b78",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████████████████████████████████████████████████████████████████████| 10840/10840 [00:03<00:00, 2778.00it/s]\n"
     ]
    }
   ],
   "source": [
    "idx_ls =[]\n",
    "for i in tqdm(range(len(bianhao))):\n",
    "    ii = bianhao[i]\n",
    "    idx = df[df['编号'] == ii].index\n",
    "    idx_ls.append(idx[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "2417afc0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10840"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(idx_ls)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "0ac472ec",
   "metadata": {},
   "outputs": [],
   "source": [
    "df1 = df.iloc[idx_ls,[3]].reset_index(drop = True)\n",
    "df2 = data[['编号','TI 文献标题','PY 出版年']].reset_index(drop = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "695fabc7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(10840, 4)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>TI 文献标题</th>\n",
       "      <th>PY 出版年</th>\n",
       "      <th>预处理文本</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>14044</td>\n",
       "      <td>Path Planning of Cooperating Industrial Robots...</td>\n",
       "      <td>2018</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20986</td>\n",
       "      <td>A New Method to Solve the Kinematic Problems o...</td>\n",
       "      <td>2016</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8793</td>\n",
       "      <td>System Dynamics Modeling of the Fffects of the...</td>\n",
       "      <td>2019</td>\n",
       "      <td>system dynamic modeling fffects decision purch...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18064</td>\n",
       "      <td>Obstacle Avoidance Strategy of Mobile Robot Ba...</td>\n",
       "      <td>2016</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21361</td>\n",
       "      <td>Statics Modeling of an Underactuated Wire-Driv...</td>\n",
       "      <td>2014</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      编号                                            TI 文献标题 PY 出版年  \\\n",
       "0  14044  Path Planning of Cooperating Industrial Robots...   2018   \n",
       "1  20986  A New Method to Solve the Kinematic Problems o...   2016   \n",
       "2   8793  System Dynamics Modeling of the Fffects of the...   2019   \n",
       "3  18064  Obstacle Avoidance Strategy of Mobile Robot Ba...   2016   \n",
       "4  21361  Statics Modeling of an Underactuated Wire-Driv...   2014   \n",
       "\n",
       "                                               预处理文本  \n",
       "0  path planning cooperate industrial robot evolu...  \n",
       "1  method solve kinematic parallel robot generali...  \n",
       "2  system dynamic modeling fffects decision purch...  \n",
       "3  obstacle avoidance strategy mobile robot base ...  \n",
       "4  static modeling underactuated wire-driven flex...  "
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_data = pd.concat([df2,df1],axis=1)\n",
    "print(new_data.shape)\n",
    "new_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "72359509",
   "metadata": {},
   "outputs": [],
   "source": [
    "new_data.to_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\1语料.xlsx',index = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "917388a1",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40c418fd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "5cde75fd",
   "metadata": {},
   "source": [
    "### 2.抽主题"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "d95d89ed",
   "metadata": {},
   "outputs": [],
   "source": [
    "new_data = pd.read_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\2新语料.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "99c35913",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>TI 文献标题</th>\n",
       "      <th>PY 出版年</th>\n",
       "      <th>预处理文本</th>\n",
       "      <th>预处理文本2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>14044</td>\n",
       "      <td>Path Planning of Cooperating Industrial Robots...</td>\n",
       "      <td>2018</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20986</td>\n",
       "      <td>A New Method to Solve the Kinematic Problems o...</td>\n",
       "      <td>2016</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8793</td>\n",
       "      <td>System Dynamics Modeling of the Fffects of the...</td>\n",
       "      <td>2019</td>\n",
       "      <td>system dynamic modeling fffects decision purch...</td>\n",
       "      <td>system dynamic modeling decision purchase indu...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18064</td>\n",
       "      <td>Obstacle Avoidance Strategy of Mobile Robot Ba...</td>\n",
       "      <td>2016</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21361</td>\n",
       "      <td>Statics Modeling of an Underactuated Wire-Driv...</td>\n",
       "      <td>2014</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      编号                                            TI 文献标题 PY 出版年  \\\n",
       "0  14044  Path Planning of Cooperating Industrial Robots...   2018   \n",
       "1  20986  A New Method to Solve the Kinematic Problems o...   2016   \n",
       "2   8793  System Dynamics Modeling of the Fffects of the...   2019   \n",
       "3  18064  Obstacle Avoidance Strategy of Mobile Robot Ba...   2016   \n",
       "4  21361  Statics Modeling of an Underactuated Wire-Driv...   2014   \n",
       "\n",
       "                                               预处理文本  \\\n",
       "0  path planning cooperate industrial robot evolu...   \n",
       "1  method solve kinematic parallel robot generali...   \n",
       "2  system dynamic modeling fffects decision purch...   \n",
       "3  obstacle avoidance strategy mobile robot base ...   \n",
       "4  static modeling underactuated wire-driven flex...   \n",
       "\n",
       "                                              预处理文本2  \n",
       "0  path planning cooperate industrial robot evolu...  \n",
       "1  method solve kinematic parallel robot generali...  \n",
       "2  system dynamic modeling decision purchase indu...  \n",
       "3  obstacle avoidance strategy mobile robot base ...  \n",
       "4  static modeling underactuated wire-driven flex...  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2b56f840",
   "metadata": {},
   "outputs": [],
   "source": [
    "from bertopic import BERTopic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "77e29b20",
   "metadata": {},
   "outputs": [],
   "source": [
    "topic_model = BERTopic(language=\"english\"\n",
    "                       , calculate_probabilities=True\n",
    "                       , verbose=True\n",
    "                       , top_n_words = 100\n",
    "                       , n_gram_range = (1, 1)\n",
    "#                        ，nr_topics:  = None\n",
    "                      )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "a8c2ae27",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class BERTopic in module bertopic._bertopic:\n",
      "\n",
      "class BERTopic(builtins.object)\n",
      " |  BERTopic(language: str = 'english', top_n_words: int = 10, n_gram_range: Tuple[int, int] = (1, 1), min_topic_size: int = 10, nr_topics: Union[int, str] = None, low_memory: bool = False, calculate_probabilities: bool = False, seed_topic_list: List[List[str]] = None, embedding_model=None, umap_model: umap.umap_.UMAP = None, hdbscan_model: hdbscan.hdbscan_.HDBSCAN = None, vectorizer_model: sklearn.feature_extraction.text.CountVectorizer = None, ctfidf_model: sklearn.feature_extraction.text.TfidfTransformer = None, representation_model: bertopic.representation._base.BaseRepresentation = None, verbose: bool = False)\n",
      " |  \n",
      " |  BERTopic is a topic modeling technique that leverages BERT embeddings and\n",
      " |  c-TF-IDF to create dense clusters allowing for easily interpretable topics\n",
      " |  whilst keeping important words in the topic descriptions.\n",
      " |  \n",
      " |  The default embedding model is `all-MiniLM-L6-v2` when selecting `language=\"english\"`\n",
      " |  and `paraphrase-multilingual-MiniLM-L12-v2` when selecting `language=\"multilingual\"`.\n",
      " |  \n",
      " |  Attributes:\n",
      " |      topics_ (List[int]) : The topics that are generated for each document after training or updating\n",
      " |                            the topic model. The most recent topics are tracked.\n",
      " |      probabilities_ (List[float]): The probability of the assigned topic per document. These are\n",
      " |                                    only calculated if a HDBSCAN model is used for the clustering step.\n",
      " |                                    When `calculate_probabilities=True`, then it is the probabilities\n",
      " |                                    of all topics per document.\n",
      " |      topic_sizes_ (Mapping[int, int]) : The size of each topic\n",
      " |      topic_mapper_ (TopicMapper) : A class for tracking topics and their mappings anytime they are\n",
      " |                                    merged, reduced, added, or removed.\n",
      " |      topic_representations_ (Mapping[int, Tuple[int, float]]) : The top n terms per topic and their respective\n",
      " |                                                                 c-TF-IDF values.\n",
      " |      c_tf_idf_ (csr_matrix) : The topic-term matrix as calculated through c-TF-IDF. To access its respective\n",
      " |                               words, run `.vectorizer_model.get_feature_names()`  or\n",
      " |                               `.vectorizer_model.get_feature_names_out()`\n",
      " |      topic_labels_ (Mapping[int, str]) : The default labels for each topic.\n",
      " |      custom_labels_ (List[str]) : Custom labels for each topic.\n",
      " |      topic_embeddings_ (np.ndarray) : The embeddings for each topic. It is calculated by taking the\n",
      " |                                       weighted average of word embeddings in a topic based on their c-TF-IDF values.\n",
      " |      representative_docs_ (Mapping[int, str]) : The representative documents for each topic.\n",
      " |  \n",
      " |  Examples:\n",
      " |  \n",
      " |  ```python\n",
      " |  from bertopic import BERTopic\n",
      " |  from sklearn.datasets import fetch_20newsgroups\n",
      " |  \n",
      " |  docs = fetch_20newsgroups(subset='all')['data']\n",
      " |  topic_model = BERTopic()\n",
      " |  topics, probabilities = topic_model.fit_transform(docs)\n",
      " |  ```\n",
      " |  \n",
      " |  If you want to use your own embedding model, use it as follows:\n",
      " |  \n",
      " |  ```python\n",
      " |  from bertopic import BERTopic\n",
      " |  from sklearn.datasets import fetch_20newsgroups\n",
      " |  from sentence_transformers import SentenceTransformer\n",
      " |  \n",
      " |  docs = fetch_20newsgroups(subset='all')['data']\n",
      " |  sentence_model = SentenceTransformer(\"all-MiniLM-L6-v2\")\n",
      " |  topic_model = BERTopic(embedding_model=sentence_model)\n",
      " |  ```\n",
      " |  \n",
      " |  Due to the stochastisch nature of UMAP, the results from BERTopic might differ\n",
      " |  and the quality can degrade. Using your own embeddings allows you to\n",
      " |  try out BERTopic several times until you find the topics that suit\n",
      " |  you best.\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  __init__(self, language: str = 'english', top_n_words: int = 10, n_gram_range: Tuple[int, int] = (1, 1), min_topic_size: int = 10, nr_topics: Union[int, str] = None, low_memory: bool = False, calculate_probabilities: bool = False, seed_topic_list: List[List[str]] = None, embedding_model=None, umap_model: umap.umap_.UMAP = None, hdbscan_model: hdbscan.hdbscan_.HDBSCAN = None, vectorizer_model: sklearn.feature_extraction.text.CountVectorizer = None, ctfidf_model: sklearn.feature_extraction.text.TfidfTransformer = None, representation_model: bertopic.representation._base.BaseRepresentation = None, verbose: bool = False)\n",
      " |      BERTopic initialization\n",
      " |      \n",
      " |      Arguments:\n",
      " |          language: The main language used in your documents. The default sentence-transformers\n",
      " |                    model for \"english\" is `all-MiniLM-L6-v2`. For a full overview of\n",
      " |                    supported languages see bertopic.backend.languages. Select\n",
      " |                    \"multilingual\" to load in the `paraphrase-multilingual-MiniLM-L12-v2`\n",
      " |                    sentence-tranformers model that supports 50+ languages.\n",
      " |                    NOTE: This is not used if `embedding_model` is used. \n",
      " |          top_n_words: The number of words per topic to extract. Setting this\n",
      " |                       too high can negatively impact topic embeddings as topics\n",
      " |                       are typically best represented by at most 10 words.\n",
      " |          n_gram_range: The n-gram range for the CountVectorizer.\n",
      " |                        Advised to keep high values between 1 and 3.\n",
      " |                        More would likely lead to memory issues.\n",
      " |                        NOTE: This param will not be used if you pass in your own\n",
      " |                        CountVectorizer.\n",
      " |          min_topic_size: The minimum size of the topic. Increasing this value will lead\n",
      " |                          to a lower number of clusters/topics.\n",
      " |                          NOTE: This param will not be used if you are not using HDBSCAN.\n",
      " |          nr_topics: Specifying the number of topics will reduce the initial\n",
      " |                     number of topics to the value specified. This reduction can take\n",
      " |                     a while as each reduction in topics (-1) activates a c-TF-IDF\n",
      " |                     calculation. If this is set to None, no reduction is applied. Use\n",
      " |                     \"auto\" to automatically reduce topics using HDBSCAN.\n",
      " |          low_memory: Sets UMAP low memory to True to make sure less memory is used.\n",
      " |                      NOTE: This is only used in UMAP. For example, if you use PCA instead of UMAP\n",
      " |                      this parameter will not be used.\n",
      " |          calculate_probabilities: Calculate the probabilities of all topics\n",
      " |                                   per document instead of the probability of the assigned\n",
      " |                                   topic per document. This could slow down the extraction\n",
      " |                                   of topics if you have many documents (> 100_000). \n",
      " |                                   NOTE: If false you cannot use the corresponding\n",
      " |                                   visualization method `visualize_probabilities`.\n",
      " |                                   NOTE: This is an approximation of topic probabilities\n",
      " |                                   as used in HDBSCAN and not an exact representation.\n",
      " |          seed_topic_list: A list of seed words per topic to converge around\n",
      " |          verbose: Changes the verbosity of the model, Set to True if you want\n",
      " |                   to track the stages of the model.\n",
      " |          embedding_model: Use a custom embedding model.\n",
      " |                           The following backends are currently supported\n",
      " |                             * SentenceTransformers\n",
      " |                             * Flair\n",
      " |                             * Spacy\n",
      " |                             * Gensim\n",
      " |                             * USE (TF-Hub)\n",
      " |                           You can also pass in a string that points to one of the following\n",
      " |                           sentence-transformers models:\n",
      " |                             * https://www.sbert.net/docs/pretrained_models.html\n",
      " |          umap_model: Pass in a UMAP model to be used instead of the default.\n",
      " |                      NOTE: You can also pass in any dimensionality reduction algorithm as long\n",
      " |                      as it has `.fit` and `.transform` functions.\n",
      " |          hdbscan_model: Pass in a hdbscan.HDBSCAN model to be used instead of the default\n",
      " |                         NOTE: You can also pass in any clustering algorithm as long as it has\n",
      " |                         `.fit` and `.predict` functions along with the `.labels_` variable.\n",
      " |          vectorizer_model: Pass in a custom `CountVectorizer` instead of the default model.\n",
      " |          ctfidf_model: Pass in a custom ClassTfidfTransformer instead of the default model.\n",
      " |          representation_model: Pass in a model that fine-tunes the topic representations \n",
      " |                                calculated through c-TF-IDF. Models from `bertopic.representation`\n",
      " |                                are supported.\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      Get a string representation of the current object.\n",
      " |      \n",
      " |      Returns:\n",
      " |          str: Human readable representation of the most important model parameters.\n",
      " |               The parameters that represent models are ignored due to their length.\n",
      " |  \n",
      " |  approximate_distribution(self, documents: Union[str, List[str]], window: int = 4, stride: int = 1, min_similarity: float = 0.1, batch_size: int = 1000, padding: bool = False, use_embedding_model: bool = False, calculate_tokens: bool = False, separator: str = ' ') -> Tuple[numpy.ndarray, Optional[List[numpy.ndarray]]]\n",
      " |      A post-hoc approximation of topic distributions across documents.\n",
      " |      \n",
      " |      In order to perform this approximation, each document is split into tokens\n",
      " |      according to the provided tokenizer in the `CountVectorizer`. Then, a\n",
      " |      sliding window is applied on each document creating subsets of the document.\n",
      " |      For example, with a window size of 3 and stride of 1, the sentence:\n",
      " |      \n",
      " |      `Solving the right problem is difficult.`\n",
      " |      \n",
      " |      can be split up into `solving the right`, `the right problem`, `right problem is`,\n",
      " |      and `problem is difficult`. These are called tokensets. For each of these\n",
      " |      tokensets, we calculate their c-TF-IDF representation and find out\n",
      " |      how similar they are to the previously generated topics. Then, the\n",
      " |      similarities to the topics for each tokenset are summed in order to\n",
      " |      create a topic distribution for the entire document.\n",
      " |      \n",
      " |      We can also dive into this a bit deeper by then splitting these tokensets\n",
      " |      up into individual tokens and calculate how much a word, in a specific sentence,\n",
      " |      contributes to the topics found in that document. This can be enabled by\n",
      " |      setting `calculate_tokens=True` which can be used for visualization purposes\n",
      " |      in `topic_model.visualize_approximate_distribution`.\n",
      " |      \n",
      " |      The main output, `topic_distributions`, can also be used directly in\n",
      " |      `.visualize_distribution(topic_distributions[index])` by simply selecting\n",
      " |      a single distribution.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          documents: A single document or a list of documents for which we\n",
      " |                  approximate their topic distributions\n",
      " |          window: Size of the moving window which indicates the number of\n",
      " |                  tokens being considered.\n",
      " |          stride: How far the window should move at each step.\n",
      " |          min_similarity: The minimum similarity of a document's tokenset\n",
      " |                          with respect to the topics.\n",
      " |          batch_size: The number of documents to process at a time. If None,\n",
      " |                      then all documents are processed at once.\n",
      " |                      NOTE: With a large number of documents, it is not\n",
      " |                      advised to process all documents at once.\n",
      " |          padding: Whether to pad the beginning and ending of a document with\n",
      " |                   empty tokens.\n",
      " |          use_embedding_model: Whether to use the topic model's embedding\n",
      " |                              model to calculate the similarity between\n",
      " |                              tokensets and topics instead of using c-TF-IDF.\n",
      " |          calculate_tokens: Calculate the similarity of tokens with all topics.\n",
      " |                          NOTE: This is computation-wise more expensive and\n",
      " |                          can require more memory. Using this over batches of\n",
      " |                          documents might be preferred.\n",
      " |          separator: The separator used to merge tokens into tokensets.\n",
      " |      \n",
      " |      Returns:\n",
      " |          topic_distributions: A `n` x `m` matrix containing the topic distributions\n",
      " |                              for all input documents with `n` being the documents\n",
      " |                              and `m` the topics.\n",
      " |          topic_token_distributions: A list of `t` x `m` arrays with `t` being the\n",
      " |                                  number of tokens for the respective document\n",
      " |                                  and `m` the topics.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      After fitting the model, the topic distributions can be calculated regardless\n",
      " |      of the clustering model and regardless of whether the documents were previously\n",
      " |      seen or not:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_distr, _ = topic_model.approximate_distribution(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      As a result, the topic distributions are calculated in `topic_distr` for the\n",
      " |      entire document based on token set with a specific window size and stride.\n",
      " |      \n",
      " |      If you want to calculate the topic distributions on a token-level:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_distr, topic_token_distr = topic_model.approximate_distribution(docs, calculate_tokens=True)\n",
      " |      ```\n",
      " |      \n",
      " |      The `topic_token_distr` then contains, for each token, the best fitting topics.\n",
      " |      As with `topic_distr`, it can contain multiple topics for a single token.\n",
      " |  \n",
      " |  find_topics(self, search_term: str, top_n: int = 5) -> Tuple[List[int], List[float]]\n",
      " |      Find topics most similar to a search_term\n",
      " |      \n",
      " |      Creates an embedding for search_term and compares that with\n",
      " |      the topic embeddings. The most similar topics are returned\n",
      " |      along with their similarity values.\n",
      " |      \n",
      " |      The search_term can be of any size but since it compares\n",
      " |      with the topic representation it is advised to keep it\n",
      " |      below 5 words.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          search_term: the term you want to use to search for topics\n",
      " |          top_n: the number of topics to return\n",
      " |      \n",
      " |      Returns:\n",
      " |          similar_topics: the most similar topics from high to low\n",
      " |          similarity: the similarity scores from high to low\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      You can use the underlying embedding model to find topics that\n",
      " |      best represent the search term:\n",
      " |      \n",
      " |      ```python\n",
      " |      topics, similarity = topic_model.find_topics(\"sports\", top_n=5)\n",
      " |      ```\n",
      " |      \n",
      " |      Note that the search query is typically more accurate if the\n",
      " |      search_term consists of a phrase or multiple words.\n",
      " |  \n",
      " |  fit(self, documents: List[str], embeddings: numpy.ndarray = None, y: Union[List[int], numpy.ndarray] = None)\n",
      " |      Fit the models (Bert, UMAP, and, HDBSCAN) on a collection of documents and generate topics\n",
      " |      \n",
      " |      Arguments:\n",
      " |          documents: A list of documents to fit on\n",
      " |          embeddings: Pre-trained document embeddings. These can be used\n",
      " |                      instead of the sentence-transformer model\n",
      " |          y: The target class for (semi)-supervised modeling. Use -1 if no class for a\n",
      " |             specific instance is specified.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      \n",
      " |      docs = fetch_20newsgroups(subset='all')['data']\n",
      " |      topic_model = BERTopic().fit(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      If you want to use your own embeddings, use it as follows:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      from sentence_transformers import SentenceTransformer\n",
      " |      \n",
      " |      # Create embeddings\n",
      " |      docs = fetch_20newsgroups(subset='all')['data']\n",
      " |      sentence_model = SentenceTransformer(\"all-MiniLM-L6-v2\")\n",
      " |      embeddings = sentence_model.encode(docs, show_progress_bar=True)\n",
      " |      \n",
      " |      # Create topic model\n",
      " |      topic_model = BERTopic().fit(docs, embeddings)\n",
      " |      ```\n",
      " |  \n",
      " |  fit_transform(self, documents: List[str], embeddings: numpy.ndarray = None, y: Union[List[int], numpy.ndarray] = None) -> Tuple[List[int], Optional[numpy.ndarray]]\n",
      " |      Fit the models on a collection of documents, generate topics, and return the docs with topics\n",
      " |      \n",
      " |      Arguments:\n",
      " |          documents: A list of documents to fit on\n",
      " |          embeddings: Pre-trained document embeddings. These can be used\n",
      " |                      instead of the sentence-transformer model\n",
      " |          y: The target class for (semi)-supervised modeling. Use -1 if no class for a\n",
      " |             specific instance is specified.\n",
      " |      \n",
      " |      Returns:\n",
      " |          predictions: Topic predictions for each documents\n",
      " |          probabilities: The probability of the assigned topic per document.\n",
      " |                         If `calculate_probabilities` in BERTopic is set to True, then\n",
      " |                         it calculates the probabilities of all topics across all documents\n",
      " |                         instead of only the assigned topic. This, however, slows down\n",
      " |                         computation and may increase memory usage.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      \n",
      " |      docs = fetch_20newsgroups(subset='all')['data']\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      If you want to use your own embeddings, use it as follows:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      from sentence_transformers import SentenceTransformer\n",
      " |      \n",
      " |      # Create embeddings\n",
      " |      docs = fetch_20newsgroups(subset='all')['data']\n",
      " |      sentence_model = SentenceTransformer(\"all-MiniLM-L6-v2\")\n",
      " |      embeddings = sentence_model.encode(docs, show_progress_bar=True)\n",
      " |      \n",
      " |      # Create topic model\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs, embeddings)\n",
      " |      ```\n",
      " |  \n",
      " |  generate_topic_labels(self, nr_words: int = 3, topic_prefix: bool = True, word_length: int = None, separator: str = '_') -> List[str]\n",
      " |      Get labels for each topic in a user-defined format\n",
      " |      \n",
      " |      Arguments:\n",
      " |          original_labels:\n",
      " |          nr_words: Top `n` words per topic to use\n",
      " |          topic_prefix: Whether to use the topic ID as a prefix.\n",
      " |                      If set to True, the topic ID will be separated\n",
      " |                      using the `separator`\n",
      " |          word_length: The maximum length of each word in the topic label.\n",
      " |                      Some words might be relatively long and setting this\n",
      " |                      value helps to make sure that all labels have relatively\n",
      " |                      similar lengths.\n",
      " |          separator: The string with which the words and topic prefix will be\n",
      " |                  separated. Underscores are the default but a nice alternative\n",
      " |                  is `\", \"`.\n",
      " |      \n",
      " |      Returns:\n",
      " |          topic_labels: A list of topic labels sorted from the lowest topic ID to the highest.\n",
      " |                      If the topic model was trained using HDBSCAN, the lowest topic ID is -1,\n",
      " |                      otherwise it is 0.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To create our custom topic labels, usage is rather straightforward:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_labels = topic_model.get_topic_labels(nr_words=2, separator=\", \")\n",
      " |      ```\n",
      " |  \n",
      " |  get_document_info(self, docs: List[str], df: pandas.core.frame.DataFrame = None, metadata: Mapping[str, Any] = None) -> pandas.core.frame.DataFrame\n",
      " |      Get information about the documents on which the topic was trained\n",
      " |      including the documents themselves, their respective topics, the name\n",
      " |      of each topic, the top n words of each topic, whether it is a\n",
      " |      representative document, and probability of the clustering if the cluster\n",
      " |      model supports it.\n",
      " |      \n",
      " |      There are also options to include other meta data, such as the topic\n",
      " |      distributions or the x and y coordinates of the reduced embeddings.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The documents on which the topic model was trained.\n",
      " |          df: A dataframe containing the metadata and the documents on which\n",
      " |              the topic model was originally trained on.\n",
      " |          metadata: A dictionary with meta data for each document in the form\n",
      " |                  of column name (key) and the respective values (value).\n",
      " |      \n",
      " |      Returns:\n",
      " |          document_info: A dataframe with several statistics regarding\n",
      " |                      the documents on which the topic model was trained.\n",
      " |      \n",
      " |      Usage:\n",
      " |      \n",
      " |      To get the document info, you will only need to pass the documents on which\n",
      " |      the topic model was trained:\n",
      " |      \n",
      " |      ```python\n",
      " |      document_info = topic_model.get_document_info(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      There are additionally options to include meta data, such as the topic\n",
      " |      distributions. Moreover, we can pass the original dataframe that contains\n",
      " |      the documents and extend it with the information retrieved from BERTopic:\n",
      " |      \n",
      " |      ```python\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      \n",
      " |      # The original data in a dataframe format to include the target variable\n",
      " |      data= fetch_20newsgroups(subset='all',  remove=('headers', 'footers', 'quotes'))\n",
      " |      df = pd.DataFrame({\"Document\": data['data'], \"Class\": data['target']})\n",
      " |      \n",
      " |      # Add information about the percentage of the document that relates to the topic\n",
      " |      topic_distr, _ = topic_model.approximate_distribution(docs, batch_size=1000)\n",
      " |      distributions = [distr[topic] if topic != -1 else 0 for topic, distr in zip(topics, topic_distr)]\n",
      " |      \n",
      " |      # Create our documents dataframe using the original dataframe and meta data about\n",
      " |      # the topic distributions\n",
      " |      document_info = topic_model.get_document_info(docs, df=df,\n",
      " |                                                    metadata={\"Topic_distribution\": distributions})\n",
      " |      ```\n",
      " |  \n",
      " |  get_params(self, deep: bool = False) -> Mapping[str, Any]\n",
      " |      Get parameters for this estimator.\n",
      " |      \n",
      " |      Adapted from:\n",
      " |          https://github.com/scikit-learn/scikit-learn/blob/b3ea3ed6a/sklearn/base.py#L178\n",
      " |      \n",
      " |      Arguments:\n",
      " |          deep: bool, default=True\n",
      " |                If True, will return the parameters for this estimator and\n",
      " |                contained subobjects that are estimators.\n",
      " |      \n",
      " |      Returns:\n",
      " |          out: Parameter names mapped to their values.\n",
      " |  \n",
      " |  get_representative_docs(self, topic: int = None) -> List[str]\n",
      " |      Extract the best representing documents per topic.\n",
      " |      \n",
      " |      NOTE:\n",
      " |          This does not extract all documents per topic as all documents\n",
      " |          are not saved within BERTopic. To get all documents, please\n",
      " |          run the following:\n",
      " |      \n",
      " |          ```python\n",
      " |          # When you used `.fit_transform`:\n",
      " |          df = pd.DataFrame({\"Document\": docs, \"Topic\": topic})\n",
      " |      \n",
      " |          # When you used `.fit`:\n",
      " |          df = pd.DataFrame({\"Document\": docs, \"Topic\": topic_model.topics_})\n",
      " |          ```\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic: A specific topic for which you want\n",
      " |                 the representative documents\n",
      " |      \n",
      " |      Returns:\n",
      " |          Representative documents of the chosen topic\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To extract the representative docs of all topics:\n",
      " |      \n",
      " |      ```python\n",
      " |      representative_docs = topic_model.get_representative_docs()\n",
      " |      ```\n",
      " |      \n",
      " |      To get the representative docs of a single topic:\n",
      " |      \n",
      " |      ```python\n",
      " |      representative_docs = topic_model.get_representative_docs(12)\n",
      " |      ```\n",
      " |  \n",
      " |  get_topic(self, topic: int) -> Union[Mapping[str, Tuple[str, float]], bool]\n",
      " |      Return top n words for a specific topic and their c-TF-IDF scores\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic: A specific topic for which you want its representation\n",
      " |      \n",
      " |      Returns:\n",
      " |          The top n words for a specific word and its respective c-TF-IDF scores\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic = topic_model.get_topic(12)\n",
      " |      ```\n",
      " |  \n",
      " |  get_topic_freq(self, topic: int = None) -> Union[pandas.core.frame.DataFrame, int]\n",
      " |      Return the the size of topics (descending order)\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic: A specific topic for which you want the frequency\n",
      " |      \n",
      " |      Returns:\n",
      " |          Either the frequency of a single topic or dataframe with\n",
      " |          the frequencies of all topics\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To extract the frequency of all topics:\n",
      " |      \n",
      " |      ```python\n",
      " |      frequency = topic_model.get_topic_freq()\n",
      " |      ```\n",
      " |      \n",
      " |      To get the frequency of a single topic:\n",
      " |      \n",
      " |      ```python\n",
      " |      frequency = topic_model.get_topic_freq(12)\n",
      " |      ```\n",
      " |  \n",
      " |  get_topic_info(self, topic: int = None) -> pandas.core.frame.DataFrame\n",
      " |      Get information about each topic including its ID, frequency, and name.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic: A specific topic for which you want the frequency\n",
      " |      \n",
      " |      Returns:\n",
      " |          info: The information relating to either a single topic or all topics\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      info_df = topic_model.get_topic_info()\n",
      " |      ```\n",
      " |  \n",
      " |  get_topics(self) -> Mapping[str, Tuple[str, float]]\n",
      " |      Return topics with top n words and their c-TF-IDF score\n",
      " |      \n",
      " |      Returns:\n",
      " |          self.topic_representations_: The top n words per topic and the corresponding c-TF-IDF score\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      all_topics = topic_model.get_topics()\n",
      " |      ```\n",
      " |  \n",
      " |  hierarchical_topics(self, docs: List[int], linkage_function: Callable[[scipy.sparse._csr.csr_matrix], numpy.ndarray] = None, distance_function: Callable[[scipy.sparse._csr.csr_matrix], scipy.sparse._csr.csr_matrix] = None) -> pandas.core.frame.DataFrame\n",
      " |      Create a hierarchy of topics\n",
      " |      \n",
      " |      To create this hierarchy, BERTopic needs to be already fitted once.\n",
      " |      Then, a hierarchy is calculated on the distance matrix of the c-TF-IDF\n",
      " |      representation using `scipy.cluster.hierarchy.linkage`.\n",
      " |      \n",
      " |      Based on that hierarchy, we calculate the topic representation at each\n",
      " |      merged step. This is a local representation, as we only assume that the\n",
      " |      chosen step is merged and not all others which typically improves the\n",
      " |      topic representation.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          linkage_function: The linkage function to use. Default is:\n",
      " |                          `lambda x: sch.linkage(x, 'ward', optimal_ordering=True)`\n",
      " |          distance_function: The distance function to use on the c-TF-IDF matrix. Default is:\n",
      " |                              `lambda x: 1 - cosine_similarity(x)`\n",
      " |      \n",
      " |      Returns:\n",
      " |          hierarchical_topics: A dataframe that contains a hierarchy of topics\n",
      " |                              represented by their parents and their children\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      hierarchical_topics = topic_model.hierarchical_topics(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      A custom linkage function can be used as follows:\n",
      " |      \n",
      " |      ```python\n",
      " |      from scipy.cluster import hierarchy as sch\n",
      " |      from bertopic import BERTopic\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      \n",
      " |      # Hierarchical topics\n",
      " |      linkage_function = lambda x: sch.linkage(x, 'ward', optimal_ordering=True)\n",
      " |      hierarchical_topics = topic_model.hierarchical_topics(docs, linkage_function=linkage_function)\n",
      " |      ```\n",
      " |  \n",
      " |  merge_topics(self, docs: List[str], topics_to_merge: List[Union[Iterable[int], int]]) -> None\n",
      " |      Arguments:\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          topics_to_merge: Either a list of topics or a list of list of topics\n",
      " |                          to merge. For example:\n",
      " |                              [1, 2, 3] will merge topics 1, 2 and 3\n",
      " |                              [[1, 2], [3, 4]] will merge topics 1 and 2, and\n",
      " |                              separately merge topics 3 and 4.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      If you want to merge topics 1, 2, and 3:\n",
      " |      \n",
      " |      ```python\n",
      " |      topics_to_merge = [1, 2, 3]\n",
      " |      topic_model.merge_topics(docs, topics_to_merge)\n",
      " |      ```\n",
      " |      \n",
      " |      or if you want to merge topics 1 and 2, and separately\n",
      " |      merge topics 3 and 4:\n",
      " |      \n",
      " |      ```python\n",
      " |      topics_to_merge = [[1, 2]\n",
      " |                          [3, 4]]\n",
      " |      topic_model.merge_topics(docs, topics_to_merge)\n",
      " |      ```\n",
      " |  \n",
      " |  partial_fit(self, documents: List[str], embeddings: numpy.ndarray = None, y: Union[List[int], numpy.ndarray] = None)\n",
      " |      Fit BERTopic on a subset of the data and perform online learning\n",
      " |      with batch-like data.\n",
      " |      \n",
      " |      Online topic modeling in BERTopic is performed by using dimensionality\n",
      " |      reduction and cluster algorithms that support a `partial_fit` method\n",
      " |      in order to incrementally train the topic model.\n",
      " |      \n",
      " |      Likewise, the `bertopic.vectorizers.OnlineCountVectorizer` is used\n",
      " |      to dynamically update its vocabulary when presented with new data.\n",
      " |      It has several parameters for modeling decay and updating the\n",
      " |      representations.\n",
      " |      \n",
      " |      In other words, although the main algorithm stays the same, the training\n",
      " |      procedure now works as follows:\n",
      " |      \n",
      " |      For each subset of the data:\n",
      " |      \n",
      " |      1. Generate embeddings with a pre-traing language model\n",
      " |      2. Incrementally update the dimensionality reduction algorithm with `partial_fit`\n",
      " |      3. Incrementally update the cluster algorithm with `partial_fit`\n",
      " |      4. Incrementally update the OnlineCountVectorizer and apply some form of decay\n",
      " |      \n",
      " |      Note that it is advised to use `partial_fit` with batches and\n",
      " |      not single documents for the best performance.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          documents: A list of documents to fit on\n",
      " |          embeddings: Pre-trained document embeddings. These can be used\n",
      " |                      instead of the sentence-transformer model\n",
      " |          y: The target class for (semi)-supervised modeling. Use -1 if no class for a\n",
      " |             specific instance is specified.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      from sklearn.cluster import MiniBatchKMeans\n",
      " |      from sklearn.decomposition import IncrementalPCA\n",
      " |      from bertopic.vectorizers import OnlineCountVectorizer\n",
      " |      from bertopic import BERTopic\n",
      " |      \n",
      " |      # Prepare documents\n",
      " |      docs = fetch_20newsgroups(subset=subset,  remove=('headers', 'footers', 'quotes'))[\"data\"]\n",
      " |      \n",
      " |      # Prepare sub-models that support online learning\n",
      " |      umap_model = IncrementalPCA(n_components=5)\n",
      " |      cluster_model = MiniBatchKMeans(n_clusters=50, random_state=0)\n",
      " |      vectorizer_model = OnlineCountVectorizer(stop_words=\"english\", decay=.01)\n",
      " |      \n",
      " |      topic_model = BERTopic(umap_model=umap_model,\n",
      " |                             hdbscan_model=cluster_model,\n",
      " |                             vectorizer_model=vectorizer_model)\n",
      " |      \n",
      " |      # Incrementally fit the topic model by training on 1000 documents at a time\n",
      " |      for index in range(0, len(docs), 1000):\n",
      " |          topic_model.partial_fit(docs[index: index+1000])\n",
      " |      ```\n",
      " |  \n",
      " |  reduce_outliers(self, documents: List[str], topics: List[int], strategy: str = 'distributions', probabilities: numpy.ndarray = None, threshold: int = 0, embeddings: numpy.ndarray = None, distributions_params: Mapping[str, Any] = {}) -> List[int]\n",
      " |      Reduce outliers by merging them with their nearest topic according\n",
      " |      to one of several strategies.\n",
      " |      \n",
      " |      When using HDBSCAN, DBSCAN, or OPTICS, a number of outlier documents might be created\n",
      " |      that do not fall within any of the created topics. These are labeled as -1.\n",
      " |      This function allows the user to match outlier documents with their nearest topic\n",
      " |      using one of the following strategies using the `strategy` parameter:\n",
      " |          * \"probabilities\"\n",
      " |              This uses the soft-clustering as performed by HDBSCAN to find the\n",
      " |              best matching topic for each outlier document. To use this, make\n",
      " |              sure to calculate the `probabilities` beforehand by instantiating\n",
      " |              BERTopic with `calculate_probabilities=True`.\n",
      " |          * \"distributions\"\n",
      " |              Use the topic distributions, as calculated with `.approximate_distribution`\n",
      " |              to find the most frequent topic in each outlier document. You can use the\n",
      " |              `distributions_params` variable to tweak the parameters of\n",
      " |              `.approximate_distribution`.\n",
      " |          * \"c-tf-idf\"\n",
      " |              Calculate the c-TF-IDF representation for each outlier document and\n",
      " |              find the best matching c-TF-IDF topic representation using\n",
      " |              cosine similarity.\n",
      " |          * \"embeddings\"\n",
      " |              Using the embeddings of each outlier documents, find the best\n",
      " |              matching topic embedding using cosine similarity.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          documents: A list of documents for which we reduce or remove the outliers.\n",
      " |          topics: The topics that correspond to the documents\n",
      " |          strategy: The strategy used for reducing outliers.\n",
      " |                  Options:\n",
      " |                      * \"probabilities\"\n",
      " |                          This uses the soft-clustering as performed by HDBSCAN\n",
      " |                          to find the best matching topic for each outlier document.\n",
      " |      \n",
      " |                      * \"distributions\"\n",
      " |                          Use the topic distributions, as calculated with `.approximate_distribution`\n",
      " |                          to find the most frequent topic in each outlier document.\n",
      " |      \n",
      " |                      * \"c-tf-idf\"\n",
      " |                          Calculate the c-TF-IDF representation for outlier documents and\n",
      " |                          find the best matching c-TF-IDF topic representation.\n",
      " |      \n",
      " |                      * \"embeddings\"\n",
      " |                          Calculate the embeddings for outlier documents and\n",
      " |                          find the best matching topic embedding.\n",
      " |          threshold: The threshold for assigning topics to outlier documents. This value\n",
      " |                  represents the minimum probability when `strategy=\"probabilities\"`.\n",
      " |                  For all other strategies, it represents the minimum similarity.\n",
      " |          embeddings: The pre-computed embeddings to be used when `strategy=\"embeddings\"`.\n",
      " |                      If this is None, then it will compute the embeddings for the outlier documents.\n",
      " |          distributions_params: The parameters used in `.approximate_distribution` when using\n",
      " |                                the strategy `\"distributions\"`.\n",
      " |      \n",
      " |      Returns:\n",
      " |          new_topics: The updated topics\n",
      " |      \n",
      " |      Usage:\n",
      " |      \n",
      " |      The default settings uses the `\"distributions\"` strategy:\n",
      " |      \n",
      " |      ```python\n",
      " |      new_topics = topic_model.reduce_outliers(docs, topics)\n",
      " |      ```\n",
      " |      \n",
      " |      When you use the `\"probabilities\"` strategy, make sure to also pass the probabilities\n",
      " |      as generated through HDBSCAN:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      topic_model = BERTopic(calculate_probabilities=True)\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      \n",
      " |      new_topics = topic_model.reduce_outliers(docs, topics, probabilities=probs, strategy=\"probabilities\")\n",
      " |      ```\n",
      " |  \n",
      " |  reduce_topics(self, docs: List[str], nr_topics: Union[int, str] = 20) -> None\n",
      " |      Reduce the number of topics to a fixed number of topics\n",
      " |      or automatically.\n",
      " |      \n",
      " |      If nr_topics is a integer, then the number of topics is reduced\n",
      " |      to nr_topics using `AgglomerativeClustering` on the cosine distance matrix\n",
      " |      of the topic embeddings.\n",
      " |      \n",
      " |      If nr_topics is `\"auto\"`, then HDBSCAN is used to automatically\n",
      " |      reduce the number of topics by running it on the topic embeddings.\n",
      " |      \n",
      " |      The topics, their sizes, and representations are updated.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The docs you used when calling either `fit` or `fit_transform`\n",
      " |          nr_topics: The number of topics you want reduced to\n",
      " |      \n",
      " |      Updates:\n",
      " |          topics_ : Assigns topics to their merged representations.\n",
      " |          probabilities_ : Assigns probabilities to their merged representations.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      You can further reduce the topics by passing the documents with its\n",
      " |      topics and probabilities (if they were calculated):\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.reduce_topics(docs, nr_topics=30)\n",
      " |      ```\n",
      " |      \n",
      " |      You can then access the updated topics and probabilities with:\n",
      " |      \n",
      " |      ```python\n",
      " |      topics = topic_model.topics_\n",
      " |      probabilities = topic_model.probabilities_\n",
      " |      ```\n",
      " |  \n",
      " |  save(self, path: str, save_embedding_model: bool = True) -> None\n",
      " |      Saves the model to the specified path\n",
      " |      \n",
      " |      When saving the model, make sure to also keep track of the versions\n",
      " |      of dependencies and Python used. Loading and saving the model should\n",
      " |      be done using the same dependencies and Python. Moreover, models\n",
      " |      saved in one version of BERTopic should not be loaded in other versions.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          path: the location and name of the file you want to save\n",
      " |          save_embedding_model: Whether to save the embedding model in this class\n",
      " |                                as you might have selected a local model or one that\n",
      " |                                is downloaded automatically from the cloud.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.save(\"my_model\")\n",
      " |      ```\n",
      " |      \n",
      " |      or if you do not want the embedding_model to be saved locally:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.save(\"my_model\", save_embedding_model=False)\n",
      " |      ```\n",
      " |  \n",
      " |  set_topic_labels(self, topic_labels: Union[List[str], Mapping[int, str]]) -> None\n",
      " |      Set custom topic labels in your fitted BERTopic model\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic_labels: If a list of topic labels, it should contain the same number\n",
      " |                      of labels as there are topics. This must be ordered\n",
      " |                      from the topic with the lowest ID to the highest ID,\n",
      " |                      including topic -1 if it exists.\n",
      " |                      If a dictionary of `topic ID`: `topic_label`, it can have\n",
      " |                      any number of topics as it will only map the topics found\n",
      " |                      in the dictionary.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      First, we define our topic labels with `.get_topic_labels` in which\n",
      " |      we can customize our topic labels:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_labels = topic_model.get_topic_labels(nr_words=2,\n",
      " |                                                  topic_prefix=True,\n",
      " |                                                  word_length=10,\n",
      " |                                                  separator=\", \")\n",
      " |      ```\n",
      " |      \n",
      " |      Then, we pass these `topic_labels` to our topic model which\n",
      " |      can be accessed at any time with `.custom_labels_`:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.set_topic_labels(topic_labels)\n",
      " |      topic_model.custom_labels_\n",
      " |      ```\n",
      " |      \n",
      " |      You might want to change only a few topic labels instead of all of them.\n",
      " |      To do so, you can pass a dictionary where the keys are the topic IDs and\n",
      " |      its keys the topic labels:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.set_topic_labels({0: \"Space\", 1: \"Sports\", 2: \"Medicine\"})\n",
      " |      topic_model.custom_labels_\n",
      " |      ```\n",
      " |  \n",
      " |  topics_over_time(self, docs: List[str], timestamps: Union[List[str], List[int]], nr_bins: int = None, datetime_format: str = None, evolution_tuning: bool = True, global_tuning: bool = True) -> pandas.core.frame.DataFrame\n",
      " |      Create topics over time\n",
      " |      \n",
      " |      To create the topics over time, BERTopic needs to be already fitted once.\n",
      " |      From the fitted models, the c-TF-IDF representations are calculate at\n",
      " |      each timestamp t. Then, the c-TF-IDF representations at timestamp t are\n",
      " |      averaged with the global c-TF-IDF representations in order to fine-tune the\n",
      " |      local representations.\n",
      " |      \n",
      " |      NOTE:\n",
      " |          Make sure to use a limited number of unique timestamps (<100) as the\n",
      " |          c-TF-IDF representation will be calculated at each single unique timestamp.\n",
      " |          Having a large number of unique timestamps can take some time to be calculated.\n",
      " |          Moreover, there aren't many use-cased where you would like to see the difference\n",
      " |          in topic representations over more than 100 different timestamps.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          timestamps: The timestamp of each document. This can be either a list of strings or ints.\n",
      " |                      If it is a list of strings, then the datetime format will be automatically\n",
      " |                      inferred. If it is a list of ints, then the documents will be ordered by\n",
      " |                      ascending order.\n",
      " |          nr_bins: The number of bins you want to create for the timestamps. The left interval will\n",
      " |                   be chosen as the timestamp. An additional column will be created with the\n",
      " |                   entire interval.\n",
      " |          datetime_format: The datetime format of the timestamps if they are strings, eg “%d/%m/%Y”.\n",
      " |                           Set this to None if you want to have it automatically detect the format.\n",
      " |                           See strftime documentation for more information on choices:\n",
      " |                           https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.\n",
      " |          evolution_tuning: Fine-tune each topic representation at timestamp *t* by averaging its\n",
      " |                            c-TF-IDF matrix with the c-TF-IDF matrix at timestamp *t-1*. This creates\n",
      " |                            evolutionary topic representations.\n",
      " |          global_tuning: Fine-tune each topic representation at timestamp *t* by averaging its c-TF-IDF matrix\n",
      " |                     with the global c-TF-IDF matrix. Turn this off if you want to prevent words in\n",
      " |                     topic representations that could not be found in the documents at timestamp *t*.\n",
      " |      \n",
      " |      Returns:\n",
      " |          topics_over_time: A dataframe that contains the topic, words, and frequency of topic\n",
      " |                            at timestamp *t*.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      The timestamps variable represent the timestamp of each document. If you have over\n",
      " |      100 unique timestamps, it is advised to bin the timestamps as shown below:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      topics_over_time = topic_model.topics_over_time(docs, timestamps, nr_bins=20)\n",
      " |      ```\n",
      " |  \n",
      " |  topics_per_class(self, docs: List[str], classes: Union[List[int], List[str]], global_tuning: bool = True) -> pandas.core.frame.DataFrame\n",
      " |      Create topics per class\n",
      " |      \n",
      " |      To create the topics per class, BERTopic needs to be already fitted once.\n",
      " |      From the fitted models, the c-TF-IDF representations are calculate at\n",
      " |      each class c. Then, the c-TF-IDF representations at class c are\n",
      " |      averaged with the global c-TF-IDF representations in order to fine-tune the\n",
      " |      local representations. This can be turned off if the pure representation is\n",
      " |      needed.\n",
      " |      \n",
      " |      NOTE:\n",
      " |          Make sure to use a limited number of unique classes (<100) as the\n",
      " |          c-TF-IDF representation will be calculated at each single unique class.\n",
      " |          Having a large number of unique classes can take some time to be calculated.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          classes: The class of each document. This can be either a list of strings or ints.\n",
      " |          global_tuning: Fine-tune each topic representation for class c t by averaging its c-TF-IDF matrix\n",
      " |                         with the global c-TF-IDF matrix. Turn this off if you want to prevent words in\n",
      " |                         topic representations that could not be found in the documents for class c.\n",
      " |      \n",
      " |      Returns:\n",
      " |          topics_per_class: A dataframe that contains the topic, words, and frequency of topics\n",
      " |                            for each class.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      topics_per_class = topic_model.topics_per_class(docs, classes)\n",
      " |      ```\n",
      " |  \n",
      " |  transform(self, documents: Union[str, List[str]], embeddings: numpy.ndarray = None) -> Tuple[List[int], numpy.ndarray]\n",
      " |      After having fit a model, use transform to predict new instances\n",
      " |      \n",
      " |      Arguments:\n",
      " |          documents: A single document or a list of documents to fit on\n",
      " |          embeddings: Pre-trained document embeddings. These can be used\n",
      " |                      instead of the sentence-transformer model.\n",
      " |      \n",
      " |      Returns:\n",
      " |          predictions: Topic predictions for each documents\n",
      " |          probabilities: The topic probability distribution which is returned by default.\n",
      " |                         If `calculate_probabilities` in BERTopic is set to False, then the\n",
      " |                         probabilities are not calculated to speed up computation and\n",
      " |                         decrease memory usage.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      \n",
      " |      docs = fetch_20newsgroups(subset='all')['data']\n",
      " |      topic_model = BERTopic().fit(docs)\n",
      " |      topics, probs = topic_model.transform(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      If you want to use your own embeddings:\n",
      " |      \n",
      " |      ```python\n",
      " |      from bertopic import BERTopic\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      from sentence_transformers import SentenceTransformer\n",
      " |      \n",
      " |      # Create embeddings\n",
      " |      docs = fetch_20newsgroups(subset='all')['data']\n",
      " |      sentence_model = SentenceTransformer(\"all-MiniLM-L6-v2\")\n",
      " |      embeddings = sentence_model.encode(docs, show_progress_bar=True)\n",
      " |      \n",
      " |      # Create topic model\n",
      " |      topic_model = BERTopic().fit(docs, embeddings)\n",
      " |      topics, probs = topic_model.transform(docs, embeddings)\n",
      " |      ```\n",
      " |  \n",
      " |  update_topics(self, docs: List[str], topics: List[int] = None, top_n_words: int = 10, n_gram_range: Tuple[int, int] = None, vectorizer_model: sklearn.feature_extraction.text.CountVectorizer = None, ctfidf_model: bertopic.vectorizers._ctfidf.ClassTfidfTransformer = None, representation_model: bertopic.representation._base.BaseRepresentation = None)\n",
      " |      Updates the topic representation by recalculating c-TF-IDF with the new\n",
      " |      parameters as defined in this function.\n",
      " |      \n",
      " |      When you have trained a model and viewed the topics and the words that represent them,\n",
      " |      you might not be satisfied with the representation. Perhaps you forgot to remove\n",
      " |      stop_words or you want to try out a different n_gram_range. This function allows you\n",
      " |      to update the topic representation after they have been formed.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          topics: A list of topics where each topic is related to a document in `docs`.\n",
      " |                  Use this variable to change or map the topics.\n",
      " |                  NOTE: Using a custom list of topic assignments may lead to errors if\n",
      " |                        topic reduction techniques are used afterwards. Make sure that\n",
      " |                        manually assigning topics is the last step in the pipeline\n",
      " |          top_n_words: The number of words per topic to extract. Setting this\n",
      " |                       too high can negatively impact topic embeddings as topics\n",
      " |                       are typically best represented by at most 10 words.\n",
      " |          n_gram_range: The n-gram range for the CountVectorizer.\n",
      " |          vectorizer_model: Pass in your own CountVectorizer from scikit-learn\n",
      " |          ctfidf_model: Pass in your own c-TF-IDF model to update the representations\n",
      " |          representation_model: Pass in a model that fine-tunes the topic representations \n",
      " |                      calculated through c-TF-IDF. Models from `bertopic.representation`\n",
      " |                      are supported.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      In order to update the topic representation, you will need to first fit the topic\n",
      " |      model and extract topics from them. Based on these, you can update the representation:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.update_topics(docs, n_gram_range=(2, 3))\n",
      " |      ```\n",
      " |      \n",
      " |      You can also use a custom vectorizer to update the representation:\n",
      " |      \n",
      " |      ```python\n",
      " |      from sklearn.feature_extraction.text import CountVectorizer\n",
      " |      vectorizer_model = CountVectorizer(ngram_range=(1, 2), stop_words=\"english\")\n",
      " |      topic_model.update_topics(docs, vectorizer_model=vectorizer_model)\n",
      " |      ```\n",
      " |      \n",
      " |      You can also use this function to change or map the topics to something else.\n",
      " |      You can update them as follows:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.update_topics(docs, my_updated_topics)\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_approximate_distribution(self, document: str, topic_token_distribution: numpy.ndarray, normalize: bool = False)\n",
      " |      Visualize the topic distribution calculated by `.approximate_topic_distribution`\n",
      " |      on a token level. Thereby indicating the extend to which a certain word or phrases belong\n",
      " |      to a specific topic. The assumption here is that a single word can belong to multiple\n",
      " |      similar topics and as such give information about the broader set of topics within\n",
      " |      a single document.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic_model: A fitted BERTopic instance.\n",
      " |          document: The document for which you want to visualize\n",
      " |                  the approximated topic distribution.\n",
      " |          topic_token_distribution: The topic-token distribution of the document as\n",
      " |                                  extracted by `.approximate_topic_distribution`\n",
      " |          normalize: Whether to normalize, between 0 and 1 (summing to 1), the\n",
      " |                  topic distribution values.\n",
      " |      \n",
      " |      Returns:\n",
      " |          df: A stylized dataframe indicating the best fitting topics\n",
      " |              for each token.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      # Calculate the topic distributions on a token level\n",
      " |      # Note that we need to have `calculate_token_level=True`\n",
      " |      topic_distr, topic_token_distr = topic_model.approximate_distribution(\n",
      " |              docs, calculate_token_level=True\n",
      " |      )\n",
      " |      \n",
      " |      # Visualize the approximated topic distributions\n",
      " |      df = topic_model.visualize_approximate_distribution(docs[0], topic_token_distr[0])\n",
      " |      df\n",
      " |      ```\n",
      " |      \n",
      " |      To revert this stylized dataframe back to a regular dataframe,\n",
      " |      you can run the following:\n",
      " |      \n",
      " |      ```python\n",
      " |      df.data.columns = [column.strip() for column in df.data.columns]\n",
      " |      df = df.data\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_barchart(self, topics: List[int] = None, top_n_topics: int = 8, n_words: int = 5, custom_labels: bool = False, title: str = 'Topic Word Scores', width: int = 250, height: int = 250) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize a barchart of selected topics\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topics: A selection of topics to visualize.\n",
      " |          top_n_topics: Only select the top n most frequent topics.\n",
      " |          n_words: Number of words to show in a topic\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of each figure.\n",
      " |          height: The height of each figure.\n",
      " |      \n",
      " |      Returns:\n",
      " |          fig: A plotly figure\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the barchart of selected topics\n",
      " |      simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_barchart()\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_barchart()\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_distribution(self, probabilities: numpy.ndarray, min_probability: float = 0.015, custom_labels: bool = False, title: str = '<b>Topic Probability Distribution</b>', width: int = 800, height: int = 600) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize the distribution of topic probabilities\n",
      " |      \n",
      " |      Arguments:\n",
      " |          probabilities: An array of probability scores\n",
      " |          min_probability: The minimum probability score to visualize.\n",
      " |                           All others are ignored.\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                         `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      Make sure to fit the model before and only input the\n",
      " |      probabilities of a single document:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_distribution(topic_model.probabilities_[0])\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_distribution(topic_model.probabilities_[0])\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_documents(self, docs: List[str], topics: List[int] = None, embeddings: numpy.ndarray = None, reduced_embeddings: numpy.ndarray = None, sample: float = None, hide_annotations: bool = False, hide_document_hover: bool = False, custom_labels: bool = False, title: str = '<b>Documents and Topics</b>', width: int = 1200, height: int = 750) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize documents and their topics in 2D\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic_model: A fitted BERTopic instance.\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          topics: A selection of topics to visualize.\n",
      " |                  Not to be confused with the topics that you get from `.fit_transform`.\n",
      " |                  For example, if you want to visualize only topics 1 through 5:\n",
      " |                  `topics = [1, 2, 3, 4, 5]`.\n",
      " |          embeddings: The embeddings of all documents in `docs`.\n",
      " |          reduced_embeddings: The 2D reduced embeddings of all documents in `docs`.\n",
      " |          sample: The percentage of documents in each topic that you would like to keep.\n",
      " |                  Value can be between 0 and 1. Setting this value to, for example,\n",
      " |                  0.1 (10% of documents in each topic) makes it easier to visualize\n",
      " |                  millions of documents as a subset is chosen.\n",
      " |          hide_annotations: Hide the names of the traces on top of each cluster.\n",
      " |          hide_document_hover: Hide the content of the documents when hovering over\n",
      " |                              specific points. Helps to speed up generation of visualization.\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the topics simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_documents(docs)\n",
      " |      ```\n",
      " |      \n",
      " |      Do note that this re-calculates the embeddings and reduces them to 2D.\n",
      " |      The advised and prefered pipeline for using this function is as follows:\n",
      " |      \n",
      " |      ```python\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      from sentence_transformers import SentenceTransformer\n",
      " |      from bertopic import BERTopic\n",
      " |      from umap import UMAP\n",
      " |      \n",
      " |      # Prepare embeddings\n",
      " |      docs = fetch_20newsgroups(subset='all',  remove=('headers', 'footers', 'quotes'))['data']\n",
      " |      sentence_model = SentenceTransformer(\"all-MiniLM-L6-v2\")\n",
      " |      embeddings = sentence_model.encode(docs, show_progress_bar=False)\n",
      " |      \n",
      " |      # Train BERTopic\n",
      " |      topic_model = BERTopic().fit(docs, embeddings)\n",
      " |      \n",
      " |      # Reduce dimensionality of embeddings, this step is optional\n",
      " |      # reduced_embeddings = UMAP(n_neighbors=10, n_components=2, min_dist=0.0, metric='cosine').fit_transform(embeddings)\n",
      " |      \n",
      " |      # Run the visualization with the original embeddings\n",
      " |      topic_model.visualize_documents(docs, embeddings=embeddings)\n",
      " |      \n",
      " |      # Or, if you have reduced the original embeddings already:\n",
      " |      topic_model.visualize_documents(docs, reduced_embeddings=reduced_embeddings)\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_documents(docs, reduced_embeddings=reduced_embeddings)\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |      \n",
      " |      <iframe src=\"../getting_started/visualization/documents.html\"\n",
      " |      style=\"width:1000px; height: 800px; border: 0px;\"\"></iframe>\n",
      " |  \n",
      " |  visualize_heatmap(self, topics: List[int] = None, top_n_topics: int = None, n_clusters: int = None, custom_labels: bool = False, title: str = '<b>Similarity Matrix</b>', width: int = 800, height: int = 800) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize a heatmap of the topic's similarity matrix\n",
      " |      \n",
      " |      Based on the cosine similarity matrix between topic embeddings,\n",
      " |      a heatmap is created showing the similarity between topics.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topics: A selection of topics to visualize.\n",
      " |          top_n_topics: Only select the top n most frequent topics.\n",
      " |          n_clusters: Create n clusters and order the similarity\n",
      " |                      matrix by those clusters.\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Returns:\n",
      " |          fig: A plotly figure\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the similarity matrix of\n",
      " |      topics simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_heatmap()\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_heatmap()\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_hierarchical_documents(self, docs: List[str], hierarchical_topics: pandas.core.frame.DataFrame, topics: List[int] = None, embeddings: numpy.ndarray = None, reduced_embeddings: numpy.ndarray = None, sample: Union[float, int] = None, hide_annotations: bool = False, hide_document_hover: bool = True, nr_levels: int = 10, custom_labels: bool = False, title: str = '<b>Hierarchical Documents and Topics</b>', width: int = 1200, height: int = 750) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize documents and their topics in 2D at different levels of hierarchy\n",
      " |      \n",
      " |      Arguments:\n",
      " |          docs: The documents you used when calling either `fit` or `fit_transform`\n",
      " |          hierarchical_topics: A dataframe that contains a hierarchy of topics\n",
      " |                              represented by their parents and their children\n",
      " |          topics: A selection of topics to visualize.\n",
      " |                  Not to be confused with the topics that you get from `.fit_transform`.\n",
      " |                  For example, if you want to visualize only topics 1 through 5:\n",
      " |                  `topics = [1, 2, 3, 4, 5]`.\n",
      " |          embeddings: The embeddings of all documents in `docs`.\n",
      " |          reduced_embeddings: The 2D reduced embeddings of all documents in `docs`.\n",
      " |          sample: The percentage of documents in each topic that you would like to keep.\n",
      " |                  Value can be between 0 and 1. Setting this value to, for example,\n",
      " |                  0.1 (10% of documents in each topic) makes it easier to visualize\n",
      " |                  millions of documents as a subset is chosen.\n",
      " |          hide_annotations: Hide the names of the traces on top of each cluster.\n",
      " |          hide_document_hover: Hide the content of the documents when hovering over\n",
      " |                              specific points. Helps to speed up generation of visualizations.\n",
      " |          nr_levels: The number of levels to be visualized in the hierarchy. First, the distances\n",
      " |                  in `hierarchical_topics.Distance` are split in `nr_levels` lists of distances with\n",
      " |                  equal length. Then, for each list of distances, the merged topics are selected that\n",
      " |                  have a distance less or equal to the maximum distance of the selected list of distances.\n",
      " |                  NOTE: To get all possible merged steps, make sure that `nr_levels` is equal to\n",
      " |                  the length of `hierarchical_topics`.\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                         `topic_model.set_topic_labels`.\n",
      " |                         NOTE: Custom labels are only generated for the original\n",
      " |                         un-merged topics.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the topics simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_hierarchical_documents(docs, hierarchical_topics)\n",
      " |      ```\n",
      " |      \n",
      " |      Do note that this re-calculates the embeddings and reduces them to 2D.\n",
      " |      The advised and prefered pipeline for using this function is as follows:\n",
      " |      \n",
      " |      ```python\n",
      " |      from sklearn.datasets import fetch_20newsgroups\n",
      " |      from sentence_transformers import SentenceTransformer\n",
      " |      from bertopic import BERTopic\n",
      " |      from umap import UMAP\n",
      " |      \n",
      " |      # Prepare embeddings\n",
      " |      docs = fetch_20newsgroups(subset='all',  remove=('headers', 'footers', 'quotes'))['data']\n",
      " |      sentence_model = SentenceTransformer(\"all-MiniLM-L6-v2\")\n",
      " |      embeddings = sentence_model.encode(docs, show_progress_bar=False)\n",
      " |      \n",
      " |      # Train BERTopic and extract hierarchical topics\n",
      " |      topic_model = BERTopic().fit(docs, embeddings)\n",
      " |      hierarchical_topics = topic_model.hierarchical_topics(docs)\n",
      " |      \n",
      " |      # Reduce dimensionality of embeddings, this step is optional\n",
      " |      # reduced_embeddings = UMAP(n_neighbors=10, n_components=2, min_dist=0.0, metric='cosine').fit_transform(embeddings)\n",
      " |      \n",
      " |      # Run the visualization with the original embeddings\n",
      " |      topic_model.visualize_hierarchical_documents(docs, hierarchical_topics, embeddings=embeddings)\n",
      " |      \n",
      " |      # Or, if you have reduced the original embeddings already:\n",
      " |      topic_model.visualize_hierarchical_documents(docs, hierarchical_topics, reduced_embeddings=reduced_embeddings)\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_hierarchical_documents(docs, hierarchical_topics, reduced_embeddings=reduced_embeddings)\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |      \n",
      " |      <iframe src=\"../getting_started/visualization/hierarchical_documents.html\"\n",
      " |      style=\"width:1000px; height: 770px; border: 0px;\"\"></iframe>\n",
      " |  \n",
      " |  visualize_hierarchy(self, orientation: str = 'left', topics: List[int] = None, top_n_topics: int = None, custom_labels: bool = False, title: str = '<b>Hierarchical Clustering</b>', width: int = 1000, height: int = 600, hierarchical_topics: pandas.core.frame.DataFrame = None, linkage_function: Callable[[scipy.sparse._csr.csr_matrix], numpy.ndarray] = None, distance_function: Callable[[scipy.sparse._csr.csr_matrix], scipy.sparse._csr.csr_matrix] = None, color_threshold: int = 1) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize a hierarchical structure of the topics\n",
      " |      \n",
      " |      A ward linkage function is used to perform the\n",
      " |      hierarchical clustering based on the cosine distance\n",
      " |      matrix between topic embeddings.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topic_model: A fitted BERTopic instance.\n",
      " |          orientation: The orientation of the figure.\n",
      " |                      Either 'left' or 'bottom'\n",
      " |          topics: A selection of topics to visualize\n",
      " |          top_n_topics: Only select the top n most frequent topics\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |                     NOTE: Custom labels are only generated for the original\n",
      " |                     un-merged topics.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure. Only works if orientation is set to 'left'\n",
      " |          height: The height of the figure. Only works if orientation is set to 'bottom'\n",
      " |          hierarchical_topics: A dataframe that contains a hierarchy of topics\n",
      " |                              represented by their parents and their children.\n",
      " |                              NOTE: The hierarchical topic names are only visualized\n",
      " |                              if both `topics` and `top_n_topics` are not set.\n",
      " |          linkage_function: The linkage function to use. Default is:\n",
      " |                          `lambda x: sch.linkage(x, 'ward', optimal_ordering=True)`\n",
      " |                          NOTE: Make sure to use the same `linkage_function` as used\n",
      " |                          in `topic_model.hierarchical_topics`.\n",
      " |          distance_function: The distance function to use on the c-TF-IDF matrix. Default is:\n",
      " |                          `lambda x: 1 - cosine_similarity(x)`\n",
      " |                          NOTE: Make sure to use the same `distance_function` as used\n",
      " |                          in `topic_model.hierarchical_topics`.\n",
      " |          color_threshold: Value at which the separation of clusters will be made which\n",
      " |                       will result in different colors for different clusters.\n",
      " |                       A higher value will typically lead in less colored clusters.\n",
      " |      \n",
      " |      Returns:\n",
      " |          fig: A plotly figure\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the hierarchical structure of\n",
      " |      topics simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_hierarchy()\n",
      " |      ```\n",
      " |      \n",
      " |      If you also want the labels visualized of hierarchical topics,\n",
      " |      run the following:\n",
      " |      \n",
      " |      ```python\n",
      " |      # Extract hierarchical topics and their representations\n",
      " |      hierarchical_topics = topic_model.hierarchical_topics(docs)\n",
      " |      \n",
      " |      # Visualize these representations\n",
      " |      topic_model.visualize_hierarchy(hierarchical_topics=hierarchical_topics)\n",
      " |      ```\n",
      " |      \n",
      " |      If you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_hierarchy()\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |      <iframe src=\"../getting_started/visualization/hierarchy.html\"\n",
      " |      style=\"width:1000px; height: 680px; border: 0px;\"\"></iframe>\n",
      " |  \n",
      " |  visualize_term_rank(self, topics: List[int] = None, log_scale: bool = False, custom_labels: bool = False, title: str = '<b>Term score decline per Topic</b>', width: int = 800, height: int = 500) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize the ranks of all terms across all topics\n",
      " |      \n",
      " |      Each topic is represented by a set of words. These words, however,\n",
      " |      do not all equally represent the topic. This visualization shows\n",
      " |      how many words are needed to represent a topic and at which point\n",
      " |      the beneficial effect of adding words starts to decline.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topics: A selection of topics to visualize. These will be colored\n",
      " |                  red where all others will be colored black.\n",
      " |          log_scale: Whether to represent the ranking on a log scale\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Returns:\n",
      " |          fig: A plotly figure\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the ranks of all words across\n",
      " |      all topics simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_term_rank()\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_term_rank()\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |      \n",
      " |      Reference:\n",
      " |      \n",
      " |      This visualization was heavily inspired by the\n",
      " |      \"Term Probability Decline\" visualization found in an\n",
      " |      analysis by the amazing [tmtoolkit](https://tmtoolkit.readthedocs.io/).\n",
      " |      Reference to that specific analysis can be found\n",
      " |      [here](https://wzbsocialsciencecenter.github.io/tm_corona/tm_analysis.html).\n",
      " |  \n",
      " |  visualize_topics(self, topics: List[int] = None, top_n_topics: int = None, custom_labels: bool = False, title: str = '<b>Intertopic Distance Map</b>', width: int = 650, height: int = 650) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize topics, their sizes, and their corresponding words\n",
      " |      \n",
      " |      This visualization is highly inspired by LDAvis, a great visualization\n",
      " |      technique typically reserved for LDA.\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topics: A selection of topics to visualize\n",
      " |          top_n_topics: Only select the top n most frequent topics\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using \n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the topics simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topic_model.visualize_topics()\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_topics()\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_topics_over_time(self, topics_over_time: pandas.core.frame.DataFrame, top_n_topics: int = None, topics: List[int] = None, normalize_frequency: bool = False, custom_labels: bool = False, title: str = '<b>Topics over Time</b>', width: int = 1250, height: int = 450) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize topics over time\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topics_over_time: The topics you would like to be visualized with the\n",
      " |                            corresponding topic representation\n",
      " |          top_n_topics: To visualize the most frequent topics instead of all\n",
      " |          topics: Select which topics you would like to be visualized\n",
      " |          normalize_frequency: Whether to normalize each topic's frequency individually\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Returns:\n",
      " |          A plotly.graph_objects.Figure including all traces\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the topics over time, simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topics_over_time = topic_model.topics_over_time(docs, timestamps)\n",
      " |      topic_model.visualize_topics_over_time(topics_over_time)\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_topics_over_time(topics_over_time)\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |  \n",
      " |  visualize_topics_per_class(self, topics_per_class: pandas.core.frame.DataFrame, top_n_topics: int = 10, topics: List[int] = None, normalize_frequency: bool = False, custom_labels: bool = False, title: str = '<b>Topics per Class</b>', width: int = 1250, height: int = 900) -> plotly.graph_objs._figure.Figure\n",
      " |      Visualize topics per class\n",
      " |      \n",
      " |      Arguments:\n",
      " |          topics_per_class: The topics you would like to be visualized with the\n",
      " |                            corresponding topic representation\n",
      " |          top_n_topics: To visualize the most frequent topics instead of all\n",
      " |          topics: Select which topics you would like to be visualized\n",
      " |          normalize_frequency: Whether to normalize each topic's frequency individually\n",
      " |          custom_labels: Whether to use custom topic labels that were defined using\n",
      " |                     `topic_model.set_topic_labels`.\n",
      " |          title: Title of the plot.\n",
      " |          width: The width of the figure.\n",
      " |          height: The height of the figure.\n",
      " |      \n",
      " |      Returns:\n",
      " |          A plotly.graph_objects.Figure including all traces\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      To visualize the topics per class, simply run:\n",
      " |      \n",
      " |      ```python\n",
      " |      topics_per_class = topic_model.topics_per_class(docs, classes)\n",
      " |      topic_model.visualize_topics_per_class(topics_per_class)\n",
      " |      ```\n",
      " |      \n",
      " |      Or if you want to save the resulting figure:\n",
      " |      \n",
      " |      ```python\n",
      " |      fig = topic_model.visualize_topics_per_class(topics_per_class)\n",
      " |      fig.write_html(\"path/to/file.html\")\n",
      " |      ```\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods defined here:\n",
      " |  \n",
      " |  load(path: str, embedding_model=None) from builtins.type\n",
      " |      Loads the model from the specified path\n",
      " |      \n",
      " |      Arguments:\n",
      " |          path: the location and name of the BERTopic file you want to load\n",
      " |          embedding_model: If the embedding_model was not saved to save space or to load\n",
      " |                           it in from the cloud, you can load it in by specifying it here.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      BERTopic.load(\"my_model\")\n",
      " |      ```\n",
      " |      \n",
      " |      or if you did not save the embedding model:\n",
      " |      \n",
      " |      ```python\n",
      " |      BERTopic.load(\"my_model\", embedding_model=\"all-MiniLM-L6-v2\")\n",
      " |      ```\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |  \n",
      " |  get_topic_tree(hier_topics: pandas.core.frame.DataFrame, max_distance: float = None, tight_layout: bool = False) -> str\n",
      " |      Extract the topic tree such that it can be printed\n",
      " |      \n",
      " |      Arguments:\n",
      " |          hier_topics: A dataframe containing the structure of the topic tree.\n",
      " |                      This is the output of `topic_model.hierachical_topics()`\n",
      " |          max_distance: The maximum distance between two topics. This value is\n",
      " |                      based on the Distance column in `hier_topics`.\n",
      " |          tight_layout: Whether to use a tight layout (narrow width) for\n",
      " |                      easier readability if you have hundreds of topics.\n",
      " |      \n",
      " |      Returns:\n",
      " |          A tree that has the following structure when printed:\n",
      " |              .\n",
      " |              .\n",
      " |              └─health_medical_disease_patients_hiv\n",
      " |                  ├─patients_medical_disease_candida_health\n",
      " |                  │    ├─■──candida_yeast_infection_gonorrhea_infections ── Topic: 48\n",
      " |                  │    └─patients_disease_cancer_medical_doctor\n",
      " |                  │         ├─■──hiv_medical_cancer_patients_doctor ── Topic: 34\n",
      " |                  │         └─■──pain_drug_patients_disease_diet ── Topic: 26\n",
      " |                  └─■──health_newsgroup_tobacco_vote_votes ── Topic: 9\n",
      " |      \n",
      " |          The blocks (■) indicate that the topic is one you can directly access\n",
      " |          from `topic_model.get_topic`. In other words, they are the original un-grouped topics.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      ```python\n",
      " |      # Train model\n",
      " |      from bertopic import BERTopic\n",
      " |      topic_model = BERTopic()\n",
      " |      topics, probs = topic_model.fit_transform(docs)\n",
      " |      hierarchical_topics = topic_model.hierarchical_topics(docs)\n",
      " |      \n",
      " |      # Print topic tree\n",
      " |      tree = topic_model.get_topic_tree(hierarchical_topics)\n",
      " |      print(tree)\n",
      " |      ```\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(BERTopic)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "34adf1e8",
   "metadata": {},
   "outputs": [],
   "source": [
    "docs = new_data['预处理文本2'].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "46e9246b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "146290f29c4443318358974273f07cfa",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Batches:   0%|          | 0/339 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-05-05 10:26:57,124 - BERTopic - Transformed documents to Embeddings\n",
      "2023-05-05 10:27:07,165 - BERTopic - Reduced dimensionality\n",
      "2023-05-05 10:27:17,806 - BERTopic - Clustered reduced embeddings\n"
     ]
    }
   ],
   "source": [
    "topics, probs = topic_model.fit_transform(docs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "f38a9c6d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Topic</th>\n",
       "      <th>Count</th>\n",
       "      <th>Name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1</td>\n",
       "      <td>3896</td>\n",
       "      <td>-1_robot_manipulator_system_control</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>438</td>\n",
       "      <td>0_walk_gait_humanoid_biped</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>387</td>\n",
       "      <td>1_cable_cabledriven_cdpr_cdprs</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2</td>\n",
       "      <td>266</td>\n",
       "      <td>2_program_industrial_software_virtual</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "      <td>252</td>\n",
       "      <td>3_calibration_error_laser_measurement</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115</th>\n",
       "      <td>114</td>\n",
       "      <td>12</td>\n",
       "      <td>114_optical_flow_mouse_sensor</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>116</th>\n",
       "      <td>115</td>\n",
       "      <td>11</td>\n",
       "      <td>115_localization_landmark_ccls_selflocalization</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117</th>\n",
       "      <td>116</td>\n",
       "      <td>11</td>\n",
       "      <td>116_product_family_multidisciplinary_design</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118</th>\n",
       "      <td>117</td>\n",
       "      <td>10</td>\n",
       "      <td>117_fault_fdi_fusion_isolation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119</th>\n",
       "      <td>118</td>\n",
       "      <td>10</td>\n",
       "      <td>118_neural_network_znn_pam</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>120 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Topic  Count                                             Name\n",
       "0       -1   3896              -1_robot_manipulator_system_control\n",
       "1        0    438                       0_walk_gait_humanoid_biped\n",
       "2        1    387                   1_cable_cabledriven_cdpr_cdprs\n",
       "3        2    266            2_program_industrial_software_virtual\n",
       "4        3    252            3_calibration_error_laser_measurement\n",
       "..     ...    ...                                              ...\n",
       "115    114     12                    114_optical_flow_mouse_sensor\n",
       "116    115     11  115_localization_landmark_ccls_selflocalization\n",
       "117    116     11      116_product_family_multidisciplinary_design\n",
       "118    117     10                   117_fault_fdi_fusion_isolation\n",
       "119    118     10                       118_neural_network_znn_pam\n",
       "\n",
       "[120 rows x 3 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1.查看主题信息\n",
    "topic_model.get_topic_info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7c57a62c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1主题缩减\n",
    "new_topic = topic_model.reduce_topics(docs, nr_topics='auto')\n",
    "topics = new_topic.topics_\n",
    "probabilities = new_topic.probabilities_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "8ad63c39",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Topic</th>\n",
       "      <th>Count</th>\n",
       "      <th>Name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1</td>\n",
       "      <td>3896</td>\n",
       "      <td>-1_robot_system_manipulator_control</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>5031</td>\n",
       "      <td>0_robot_manipulator_model_control</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>438</td>\n",
       "      <td>1_walk_gait_humanoid_biped</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2</td>\n",
       "      <td>387</td>\n",
       "      <td>2_cable_cabledriven_parallel_cdpr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "      <td>124</td>\n",
       "      <td>3_swarm_selfassembly_dock_modular</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>4</td>\n",
       "      <td>98</td>\n",
       "      <td>4_underwater_fish_water_model</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5</td>\n",
       "      <td>95</td>\n",
       "      <td>5_user_social_interaction_emotion</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6</td>\n",
       "      <td>84</td>\n",
       "      <td>6_fault_diagnosis_industrial_signal</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>7</td>\n",
       "      <td>78</td>\n",
       "      <td>7_finger_grasp_hand_selfadaptive</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>8</td>\n",
       "      <td>69</td>\n",
       "      <td>8_snake_snakelike_locomotion_gait</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9</td>\n",
       "      <td>56</td>\n",
       "      <td>9_aerial_fly_flight_model</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>10</td>\n",
       "      <td>56</td>\n",
       "      <td>10_wheel_slip_mobile_model</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>11</td>\n",
       "      <td>54</td>\n",
       "      <td>11_energy_consumption_power_industrial</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>12</td>\n",
       "      <td>41</td>\n",
       "      <td>12_reconfigurable_parallel_reconfiguration_con...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>13</td>\n",
       "      <td>37</td>\n",
       "      <td>13_jump_hop_jumping_leg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>14</td>\n",
       "      <td>34</td>\n",
       "      <td>14_storage_warehouse_assignment_pack</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>15</td>\n",
       "      <td>34</td>\n",
       "      <td>15_climb_wall_stair_wallclimbing</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>16</td>\n",
       "      <td>32</td>\n",
       "      <td>16_spray_spraypainting_system_robot</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>17</td>\n",
       "      <td>26</td>\n",
       "      <td>17_selection_decision_mcdm_decisionmaking</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>18</td>\n",
       "      <td>25</td>\n",
       "      <td>18_polish_surface_tool_removal</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>19</td>\n",
       "      <td>25</td>\n",
       "      <td>19_rfid_tag_localization_mobile</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>20</td>\n",
       "      <td>22</td>\n",
       "      <td>20_pipe_pipeline_elbow_inpipe</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>21</td>\n",
       "      <td>18</td>\n",
       "      <td>21_dual_arm_dualarm_provision</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>22</td>\n",
       "      <td>18</td>\n",
       "      <td>22_sound_source_auditory_array</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>23</td>\n",
       "      <td>18</td>\n",
       "      <td>23_spacecraft_space_satellite_dynamic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>24</td>\n",
       "      <td>17</td>\n",
       "      <td>24_gas_odor_source_sensor</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>25</td>\n",
       "      <td>14</td>\n",
       "      <td>25_lcd_glass_glasshandling_rga</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>26</td>\n",
       "      <td>13</td>\n",
       "      <td>26_eeg_brain_bci_movement</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Topic  Count                                               Name\n",
       "0      -1   3896                -1_robot_system_manipulator_control\n",
       "1       0   5031                  0_robot_manipulator_model_control\n",
       "2       1    438                         1_walk_gait_humanoid_biped\n",
       "3       2    387                  2_cable_cabledriven_parallel_cdpr\n",
       "4       3    124                  3_swarm_selfassembly_dock_modular\n",
       "5       4     98                      4_underwater_fish_water_model\n",
       "6       5     95                  5_user_social_interaction_emotion\n",
       "7       6     84                6_fault_diagnosis_industrial_signal\n",
       "8       7     78                   7_finger_grasp_hand_selfadaptive\n",
       "9       8     69                  8_snake_snakelike_locomotion_gait\n",
       "10      9     56                          9_aerial_fly_flight_model\n",
       "11     10     56                         10_wheel_slip_mobile_model\n",
       "12     11     54             11_energy_consumption_power_industrial\n",
       "13     12     41  12_reconfigurable_parallel_reconfiguration_con...\n",
       "14     13     37                            13_jump_hop_jumping_leg\n",
       "15     14     34               14_storage_warehouse_assignment_pack\n",
       "16     15     34                   15_climb_wall_stair_wallclimbing\n",
       "17     16     32                16_spray_spraypainting_system_robot\n",
       "18     17     26          17_selection_decision_mcdm_decisionmaking\n",
       "19     18     25                     18_polish_surface_tool_removal\n",
       "20     19     25                    19_rfid_tag_localization_mobile\n",
       "21     20     22                      20_pipe_pipeline_elbow_inpipe\n",
       "22     21     18                      21_dual_arm_dualarm_provision\n",
       "23     22     18                     22_sound_source_auditory_array\n",
       "24     23     18              23_spacecraft_space_satellite_dynamic\n",
       "25     24     17                          24_gas_odor_source_sensor\n",
       "26     25     14                     25_lcd_glass_glasshandling_rga\n",
       "27     26     13                          26_eeg_brain_bci_movement"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1.查看主题信息\n",
    "new_topic.get_topic_info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "533b6bd9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('robot', 0.02611381360816392),\n",
       " ('manipulator', 0.019882405928875697),\n",
       " ('model', 0.019008746411697468),\n",
       " ('control', 0.018478220946041013),\n",
       " ('system', 0.018106208922365457),\n",
       " ('method', 0.017802702091679418),\n",
       " ('parallel', 0.01753976919245467),\n",
       " ('dynamic', 0.015957976196332702),\n",
       " ('propose', 0.01571984969443877),\n",
       " ('base', 0.015711765626917874),\n",
       " ('algorithm', 0.015649694532511225),\n",
       " ('sensor', 0.01563493952477747),\n",
       " ('industrial', 0.014905744879017455),\n",
       " ('paper', 0.014740426059948243),\n",
       " ('design', 0.013296740670624991),\n",
       " ('position', 0.013098157965399097),\n",
       " ('result', 0.012920542529992928),\n",
       " ('mobile', 0.0126876819683291),\n",
       " ('error', 0.012269757010451578),\n",
       " ('simulation', 0.011863149154592526),\n",
       " ('joint', 0.011820543455376649),\n",
       " ('network', 0.01112765474311225),\n",
       " ('analysis', 0.010604207544577101),\n",
       " ('trajectory', 0.01049525748674861),\n",
       " ('controller', 0.010260429571929719),\n",
       " ('approach', 0.010199127010748243),\n",
       " ('parameter', 0.010120035871677808),\n",
       " ('kinematic', 0.009950072621089759),\n",
       " ('kinematics', 0.009749759766583014),\n",
       " ('motion', 0.009668941970664998),\n",
       " ('track', 0.009628617766166025),\n",
       " ('calibration', 0.00956864712060434),\n",
       " ('optimization', 0.009479452684383218),\n",
       " ('performance', 0.009396917854678654),\n",
       " ('accuracy', 0.009343074314834443),\n",
       " ('path', 0.008853999092882429),\n",
       " ('environment', 0.0085647267669021),\n",
       " ('time', 0.008293763012162282),\n",
       " ('inverse', 0.008136452280265537),\n",
       " ('study', 0.007867077296007535),\n",
       " ('improve', 0.007845629391713415),\n",
       " ('robotic', 0.007770207652370673),\n",
       " ('mechanism', 0.007719421374896049),\n",
       " ('develop', 0.007552627527603197),\n",
       " ('stiffness', 0.007498829306162359),\n",
       " ('navigation', 0.007470953113414238),\n",
       " ('measurement', 0.0074266782107390355),\n",
       " ('process', 0.007379071527523501),\n",
       " ('localization', 0.007333727233955804),\n",
       " ('experimental', 0.007158923328938879),\n",
       " ('solution', 0.007124934081890169),\n",
       " ('data', 0.007085844140417165),\n",
       " ('structure', 0.007071461065830213),\n",
       " ('task', 0.007058397092258474),\n",
       " ('identification', 0.007050779918573664),\n",
       " ('application', 0.007021785231499867),\n",
       " ('experiment', 0.007006774403402043),\n",
       " ('weld', 0.007001233521108439),\n",
       " ('singularity', 0.006909341082104465),\n",
       " ('equation', 0.0067507184412801576),\n",
       " ('workspace', 0.006729777776491915),\n",
       " ('flexible', 0.0065856159822352866),\n",
       " ('vision', 0.006405464768185542),\n",
       " ('provide', 0.006378240463373191),\n",
       " ('matrix', 0.00622654434330919),\n",
       " ('platform', 0.006199398964514672),\n",
       " ('solve', 0.006160241878051018),\n",
       " ('constraint', 0.006139468198153088),\n",
       " ('link', 0.006039538881090265),\n",
       " ('arm', 0.006039435323278212),\n",
       " ('compare', 0.005978950052640568),\n",
       " ('machine', 0.005940082341773841),\n",
       " ('apply', 0.005930537313567619),\n",
       " ('nonlinear', 0.005915360142595797),\n",
       " ('program', 0.005785345741652774),\n",
       " ('optimal', 0.005738307657878553),\n",
       " ('actuator', 0.005722834287230935),\n",
       " ('degree', 0.005667997377044887),\n",
       " ('space', 0.0055866701923385186),\n",
       " ('obstacle', 0.005576042794295891),\n",
       " ('vibration', 0.005522534162281463),\n",
       " ('assembly', 0.005451946630484226),\n",
       " ('reduce', 0.005413291150982079),\n",
       " ('coordinate', 0.005391770935993269),\n",
       " ('perform', 0.005391381167598258),\n",
       " ('image', 0.005373882394671955),\n",
       " ('wireless', 0.0053506470542077494),\n",
       " ('achieve', 0.005343140313234354),\n",
       " ('test', 0.005331997839675534),\n",
       " ('move', 0.005323832050903292),\n",
       " ('fuzzy', 0.005268183867282703),\n",
       " ('soft', 0.005259675356724778),\n",
       " ('finally', 0.0052245749892840376),\n",
       " ('function', 0.0052237321551656425),\n",
       " ('planning', 0.005223233338665992),\n",
       " ('force', 0.005185296607596965),\n",
       " ('velocity', 0.005158414127074612),\n",
       " ('visual', 0.005148682204297692),\n",
       " ('plan', 0.005088105649922334),\n",
       " ('technique', 0.0050858999166576)]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2查看具体主题关键词   默认前十个\n",
    "new_topic.get_topic(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "017693a5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['robot', 'algorithm', 'structure', 'process', 'task', 'time', 'system', 'perform', 'environment', 'controller', 'propose', 'robotic', 'mechanism', 'result', 'assembly', 'control', 'study', 'method', 'mobile', 'design', 'experiment', 'model', 'base', 'achieve', 'paper', 'performance', 'simulation', 'approach']\n"
     ]
    }
   ],
   "source": [
    "# 查看关键词交集\n",
    "ls1,ls2 = [],[]\n",
    "for item in new_topic.get_topic(0):\n",
    "    ls1.append(item[0])\n",
    "\n",
    "for item in new_topic.get_topic(3):\n",
    "    ls2.append(item[0])\n",
    "\n",
    "set1 = set(ls1)\n",
    "set2 = set(ls2)\n",
    "\n",
    "set3 = set1 & set2\n",
    "list3 = list(set3)\n",
    "print(list3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "ffeb5b3a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "29730ddb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Document</th>\n",
       "      <th>Topic</th>\n",
       "      <th>Name</th>\n",
       "      <th>Top_n_words</th>\n",
       "      <th>Probability</th>\n",
       "      <th>Representative_document</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1_robot_system_manipulator_control</td>\n",
       "      <td>robot - system - manipulator - control - model...</td>\n",
       "      <td>0.197073</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1_robot_system_manipulator_control</td>\n",
       "      <td>robot - system - manipulator - control - model...</td>\n",
       "      <td>0.326541</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>system dynamic modeling decision purchase indu...</td>\n",
       "      <td>0</td>\n",
       "      <td>0_robot_manipulator_model_control</td>\n",
       "      <td>robot - manipulator - model - control - system...</td>\n",
       "      <td>0.823910</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0_robot_manipulator_model_control</td>\n",
       "      <td>robot - manipulator - model - control - system...</td>\n",
       "      <td>0.643193</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>0</td>\n",
       "      <td>0_robot_manipulator_model_control</td>\n",
       "      <td>robot - manipulator - model - control - system...</td>\n",
       "      <td>0.645921</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10835</th>\n",
       "      <td>natural language process method chinese instru...</td>\n",
       "      <td>5</td>\n",
       "      <td>5_user_social_interaction_emotion</td>\n",
       "      <td>user - social - interaction - emotion - langua...</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10836</th>\n",
       "      <td>optimal design parallel robot compliant hinge ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0_robot_manipulator_model_control</td>\n",
       "      <td>robot - manipulator - model - control - system...</td>\n",
       "      <td>0.672667</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10837</th>\n",
       "      <td>predictive monitoring system autonomous mobile...</td>\n",
       "      <td>11</td>\n",
       "      <td>11_energy_consumption_power_industrial</td>\n",
       "      <td>energy - consumption - power - industrial - ro...</td>\n",
       "      <td>0.437404</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10838</th>\n",
       "      <td>path generation industrial robot track surface...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1_robot_system_manipulator_control</td>\n",
       "      <td>robot - system - manipulator - control - model...</td>\n",
       "      <td>0.726682</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10839</th>\n",
       "      <td>design method i-pd force control system base i...</td>\n",
       "      <td>0</td>\n",
       "      <td>0_robot_manipulator_model_control</td>\n",
       "      <td>robot - manipulator - model - control - system...</td>\n",
       "      <td>0.820655</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10840 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                Document  Topic  \\\n",
       "0      path planning cooperate industrial robot evolu...     -1   \n",
       "1      method solve kinematic parallel robot generali...     -1   \n",
       "2      system dynamic modeling decision purchase indu...      0   \n",
       "3      obstacle avoidance strategy mobile robot base ...      0   \n",
       "4      static modeling underactuated wire-driven flex...      0   \n",
       "...                                                  ...    ...   \n",
       "10835  natural language process method chinese instru...      5   \n",
       "10836  optimal design parallel robot compliant hinge ...      0   \n",
       "10837  predictive monitoring system autonomous mobile...     11   \n",
       "10838  path generation industrial robot track surface...     -1   \n",
       "10839  design method i-pd force control system base i...      0   \n",
       "\n",
       "                                         Name  \\\n",
       "0         -1_robot_system_manipulator_control   \n",
       "1         -1_robot_system_manipulator_control   \n",
       "2           0_robot_manipulator_model_control   \n",
       "3           0_robot_manipulator_model_control   \n",
       "4           0_robot_manipulator_model_control   \n",
       "...                                       ...   \n",
       "10835       5_user_social_interaction_emotion   \n",
       "10836       0_robot_manipulator_model_control   \n",
       "10837  11_energy_consumption_power_industrial   \n",
       "10838     -1_robot_system_manipulator_control   \n",
       "10839       0_robot_manipulator_model_control   \n",
       "\n",
       "                                             Top_n_words  Probability  \\\n",
       "0      robot - system - manipulator - control - model...     0.197073   \n",
       "1      robot - system - manipulator - control - model...     0.326541   \n",
       "2      robot - manipulator - model - control - system...     0.823910   \n",
       "3      robot - manipulator - model - control - system...     0.643193   \n",
       "4      robot - manipulator - model - control - system...     0.645921   \n",
       "...                                                  ...          ...   \n",
       "10835  user - social - interaction - emotion - langua...     1.000000   \n",
       "10836  robot - manipulator - model - control - system...     0.672667   \n",
       "10837  energy - consumption - power - industrial - ro...     0.437404   \n",
       "10838  robot - system - manipulator - control - model...     0.726682   \n",
       "10839  robot - manipulator - model - control - system...     0.820655   \n",
       "\n",
       "       Representative_document  \n",
       "0                        False  \n",
       "1                        False  \n",
       "2                        False  \n",
       "3                        False  \n",
       "4                        False  \n",
       "...                        ...  \n",
       "10835                    False  \n",
       "10836                    False  \n",
       "10837                    False  \n",
       "10838                    False  \n",
       "10839                    False  \n",
       "\n",
       "[10840 rows x 6 columns]"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 3查看文档属于当前主题的概率\n",
    "new_topic.get_document_info(docs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "7f11324a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>TI 文献标题</th>\n",
       "      <th>PY 出版年</th>\n",
       "      <th>预处理文本</th>\n",
       "      <th>预处理文本2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>14044</td>\n",
       "      <td>Path Planning of Cooperating Industrial Robots...</td>\n",
       "      <td>2018</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20986</td>\n",
       "      <td>A New Method to Solve the Kinematic Problems o...</td>\n",
       "      <td>2016</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8793</td>\n",
       "      <td>System Dynamics Modeling of the Fffects of the...</td>\n",
       "      <td>2019</td>\n",
       "      <td>system dynamic modeling fffects decision purch...</td>\n",
       "      <td>system dynamic modeling decision purchase indu...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18064</td>\n",
       "      <td>Obstacle Avoidance Strategy of Mobile Robot Ba...</td>\n",
       "      <td>2016</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21361</td>\n",
       "      <td>Statics Modeling of an Underactuated Wire-Driv...</td>\n",
       "      <td>2014</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      编号                                            TI 文献标题 PY 出版年  \\\n",
       "0  14044  Path Planning of Cooperating Industrial Robots...   2018   \n",
       "1  20986  A New Method to Solve the Kinematic Problems o...   2016   \n",
       "2   8793  System Dynamics Modeling of the Fffects of the...   2019   \n",
       "3  18064  Obstacle Avoidance Strategy of Mobile Robot Ba...   2016   \n",
       "4  21361  Statics Modeling of an Underactuated Wire-Driv...   2014   \n",
       "\n",
       "                                               预处理文本  \\\n",
       "0  path planning cooperate industrial robot evolu...   \n",
       "1  method solve kinematic parallel robot generali...   \n",
       "2  system dynamic modeling fffects decision purch...   \n",
       "3  obstacle avoidance strategy mobile robot base ...   \n",
       "4  static modeling underactuated wire-driven flex...   \n",
       "\n",
       "                                              预处理文本2  \n",
       "0  path planning cooperate industrial robot evolu...  \n",
       "1  method solve kinematic parallel robot generali...  \n",
       "2  system dynamic modeling decision purchase indu...  \n",
       "3  obstacle avoidance strategy mobile robot base ...  \n",
       "4  static modeling underactuated wire-driven flex...  "
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 保存表格\n",
    "new_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "d32f8906",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Document</th>\n",
       "      <th>Topic</th>\n",
       "      <th>Probability</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>-1</td>\n",
       "      <td>0.197073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>-1</td>\n",
       "      <td>0.326541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>system dynamic modeling decision purchase indu...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.823910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.643193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.645921</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            Document  Topic  Probability\n",
       "0  path planning cooperate industrial robot evolu...     -1     0.197073\n",
       "1  method solve kinematic parallel robot generali...     -1     0.326541\n",
       "2  system dynamic modeling decision purchase indu...      0     0.823910\n",
       "3  obstacle avoidance strategy mobile robot base ...      0     0.643193\n",
       "4  static modeling underactuated wire-driven flex...      0     0.645921"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "need_data = new_topic.get_document_info(docs).iloc[:,[0,1,4]]\n",
    "need_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "c3f9a8a8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>TI 文献标题</th>\n",
       "      <th>PY 出版年</th>\n",
       "      <th>预处理文本</th>\n",
       "      <th>预处理文本2</th>\n",
       "      <th>Document</th>\n",
       "      <th>Topic</th>\n",
       "      <th>Probability</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>14044</td>\n",
       "      <td>Path Planning of Cooperating Industrial Robots...</td>\n",
       "      <td>2018</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>path planning cooperate industrial robot evolu...</td>\n",
       "      <td>-1</td>\n",
       "      <td>0.197073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20986</td>\n",
       "      <td>A New Method to Solve the Kinematic Problems o...</td>\n",
       "      <td>2016</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>method solve kinematic parallel robot generali...</td>\n",
       "      <td>-1</td>\n",
       "      <td>0.326541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8793</td>\n",
       "      <td>System Dynamics Modeling of the Fffects of the...</td>\n",
       "      <td>2019</td>\n",
       "      <td>system dynamic modeling fffects decision purch...</td>\n",
       "      <td>system dynamic modeling decision purchase indu...</td>\n",
       "      <td>system dynamic modeling decision purchase indu...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.823910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18064</td>\n",
       "      <td>Obstacle Avoidance Strategy of Mobile Robot Ba...</td>\n",
       "      <td>2016</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>obstacle avoidance strategy mobile robot base ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.643193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21361</td>\n",
       "      <td>Statics Modeling of an Underactuated Wire-Driv...</td>\n",
       "      <td>2014</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>static modeling underactuated wire-driven flex...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.645921</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      编号                                            TI 文献标题 PY 出版年  \\\n",
       "0  14044  Path Planning of Cooperating Industrial Robots...   2018   \n",
       "1  20986  A New Method to Solve the Kinematic Problems o...   2016   \n",
       "2   8793  System Dynamics Modeling of the Fffects of the...   2019   \n",
       "3  18064  Obstacle Avoidance Strategy of Mobile Robot Ba...   2016   \n",
       "4  21361  Statics Modeling of an Underactuated Wire-Driv...   2014   \n",
       "\n",
       "                                               预处理文本  \\\n",
       "0  path planning cooperate industrial robot evolu...   \n",
       "1  method solve kinematic parallel robot generali...   \n",
       "2  system dynamic modeling fffects decision purch...   \n",
       "3  obstacle avoidance strategy mobile robot base ...   \n",
       "4  static modeling underactuated wire-driven flex...   \n",
       "\n",
       "                                              预处理文本2  \\\n",
       "0  path planning cooperate industrial robot evolu...   \n",
       "1  method solve kinematic parallel robot generali...   \n",
       "2  system dynamic modeling decision purchase indu...   \n",
       "3  obstacle avoidance strategy mobile robot base ...   \n",
       "4  static modeling underactuated wire-driven flex...   \n",
       "\n",
       "                                            Document  Topic  Probability  \n",
       "0  path planning cooperate industrial robot evolu...     -1     0.197073  \n",
       "1  method solve kinematic parallel robot generali...     -1     0.326541  \n",
       "2  system dynamic modeling decision purchase indu...      0     0.823910  \n",
       "3  obstacle avoidance strategy mobile robot base ...      0     0.643193  \n",
       "4  static modeling underactuated wire-driven flex...      0     0.645921  "
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "save_data = pd.concat([new_data, need_data],axis=1)\n",
    "save_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "6ac50498",
   "metadata": {},
   "outputs": [],
   "source": [
    "# save_data.to_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\3文档属于主题的概率.xlsx',index = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3589a128",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "c6411765",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{-1: [('robot', 0.026376499869617136),\n",
       "  ('system', 0.019602844358412773),\n",
       "  ('manipulator', 0.019545957655431875),\n",
       "  ('control', 0.018171058041411073),\n",
       "  ('model', 0.017441712038635107),\n",
       "  ('parallel', 0.01669380943671252),\n",
       "  ('method', 0.015328398086010647),\n",
       "  ('design', 0.014774842837611622),\n",
       "  ('base', 0.014568155038711474),\n",
       "  ('paper', 0.014269593592626853),\n",
       "  ('propose', 0.01400127952694198),\n",
       "  ('mobile', 0.013902951148083221),\n",
       "  ('dynamic', 0.013756312432643504),\n",
       "  ('industrial', 0.013316062927521913),\n",
       "  ('algorithm', 0.01301785009959863),\n",
       "  ('sensor', 0.012860007504885368),\n",
       "  ('motion', 0.012124696610889047),\n",
       "  ('result', 0.011872622755075685),\n",
       "  ('joint', 0.011282986123509513),\n",
       "  ('human', 0.010937474614618027),\n",
       "  ('analysis', 0.010925371987276757),\n",
       "  ('kinematic', 0.010790760087565254),\n",
       "  ('simulation', 0.010517172895137863),\n",
       "  ('performance', 0.010225583266010923),\n",
       "  ('position', 0.010137612920430774),\n",
       "  ('approach', 0.00991012713248796),\n",
       "  ('task', 0.009873606507094757),\n",
       "  ('environment', 0.009532736288910252),\n",
       "  ('mechanism', 0.009248912119060863),\n",
       "  ('kinematics', 0.009186748090402288),\n",
       "  ('error', 0.009130775989783636),\n",
       "  ('parameter', 0.009108432198545386),\n",
       "  ('object', 0.008748581216296882),\n",
       "  ('develop', 0.008663202051408088),\n",
       "  ('track', 0.00864942496465738),\n",
       "  ('controller', 0.008590283850924018),\n",
       "  ('trajectory', 0.008527355772888138),\n",
       "  ('study', 0.008478257997519764),\n",
       "  ('optimization', 0.008427110891480604),\n",
       "  ('process', 0.008410364124845457),\n",
       "  ('workspace', 0.008400985357546409),\n",
       "  ('accuracy', 0.008357917879562395),\n",
       "  ('path', 0.008061195264975096),\n",
       "  ('platform', 0.007817293928550469),\n",
       "  ('data', 0.007742439672097691),\n",
       "  ('time', 0.007436299905078783),\n",
       "  ('robotic', 0.007434702569747373),\n",
       "  ('experiment', 0.007391470937167877),\n",
       "  ('machine', 0.007248247528294192),\n",
       "  ('structure', 0.00700763979852676),\n",
       "  ('improve', 0.006890125915400716),\n",
       "  ('arm', 0.006847567700066278),\n",
       "  ('test', 0.006785301580140431),\n",
       "  ('application', 0.006735866368870099),\n",
       "  ('network', 0.006717090273602431),\n",
       "  ('perform', 0.006578249251218985),\n",
       "  ('provide', 0.006391157413959666),\n",
       "  ('obstacle', 0.006389181674898631),\n",
       "  ('inverse', 0.0063734074939465896),\n",
       "  ('operation', 0.006267060380731435),\n",
       "  ('move', 0.0062322619648769225),\n",
       "  ('apply', 0.006192893110763238),\n",
       "  ('optimal', 0.006179424973872854),\n",
       "  ('navigation', 0.006139802256071903),\n",
       "  ('flexible', 0.006026104617887854),\n",
       "  ('drive', 0.006023449748377087),\n",
       "  ('experimental', 0.0059581201276431885),\n",
       "  ('assembly', 0.005864447886519415),\n",
       "  ('compare', 0.005849406712765709),\n",
       "  ('function', 0.005789106447397191),\n",
       "  ('image', 0.0057365563000974186),\n",
       "  ('force', 0.0056473937257052395),\n",
       "  ('interaction', 0.005644878235198452),\n",
       "  ('solution', 0.005631638627638577),\n",
       "  ('space', 0.005590312456228273),\n",
       "  ('mode', 0.005563252677846213),\n",
       "  ('link', 0.005559799509639085),\n",
       "  ('autonomous', 0.005379286659179004),\n",
       "  ('degree', 0.005360032807458363),\n",
       "  ('humanrobot', 0.005313313186074282),\n",
       "  ('movement', 0.005294628929964812),\n",
       "  ('learn', 0.005286187725247885),\n",
       "  ('actuator', 0.005261278470324299),\n",
       "  ('camera', 0.005204392984971155),\n",
       "  ('constraint', 0.005188927928642264),\n",
       "  ('localization', 0.0051871373511334536),\n",
       "  ('solve', 0.0051797107072753205),\n",
       "  ('calibration', 0.005169633254623483),\n",
       "  ('achieve', 0.0051638086033700525),\n",
       "  ('program', 0.005128392705728747),\n",
       "  ('equation', 0.00511279768535337),\n",
       "  ('require', 0.005093735591620753),\n",
       "  ('analyze', 0.005090181909430493),\n",
       "  ('operator', 0.005042430795077325),\n",
       "  ('plan', 0.005034002125906604),\n",
       "  ('tool', 0.0050205719455525865),\n",
       "  ('identification', 0.004983000202177669),\n",
       "  ('finally', 0.004914705970742375),\n",
       "  ('map', 0.004913438570998216),\n",
       "  ('implement', 0.004898725370871926)],\n",
       " 0: [('robot', 0.02611381360816392),\n",
       "  ('manipulator', 0.019882405928875697),\n",
       "  ('model', 0.019008746411697468),\n",
       "  ('control', 0.018478220946041013),\n",
       "  ('system', 0.018106208922365457),\n",
       "  ('method', 0.017802702091679418),\n",
       "  ('parallel', 0.01753976919245467),\n",
       "  ('dynamic', 0.015957976196332702),\n",
       "  ('propose', 0.01571984969443877),\n",
       "  ('base', 0.015711765626917874),\n",
       "  ('algorithm', 0.015649694532511225),\n",
       "  ('sensor', 0.01563493952477747),\n",
       "  ('industrial', 0.014905744879017455),\n",
       "  ('paper', 0.014740426059948243),\n",
       "  ('design', 0.013296740670624991),\n",
       "  ('position', 0.013098157965399097),\n",
       "  ('result', 0.012920542529992928),\n",
       "  ('mobile', 0.0126876819683291),\n",
       "  ('error', 0.012269757010451578),\n",
       "  ('simulation', 0.011863149154592526),\n",
       "  ('joint', 0.011820543455376649),\n",
       "  ('network', 0.01112765474311225),\n",
       "  ('analysis', 0.010604207544577101),\n",
       "  ('trajectory', 0.01049525748674861),\n",
       "  ('controller', 0.010260429571929719),\n",
       "  ('approach', 0.010199127010748243),\n",
       "  ('parameter', 0.010120035871677808),\n",
       "  ('kinematic', 0.009950072621089759),\n",
       "  ('kinematics', 0.009749759766583014),\n",
       "  ('motion', 0.009668941970664998),\n",
       "  ('track', 0.009628617766166025),\n",
       "  ('calibration', 0.00956864712060434),\n",
       "  ('optimization', 0.009479452684383218),\n",
       "  ('performance', 0.009396917854678654),\n",
       "  ('accuracy', 0.009343074314834443),\n",
       "  ('path', 0.008853999092882429),\n",
       "  ('environment', 0.0085647267669021),\n",
       "  ('time', 0.008293763012162282),\n",
       "  ('inverse', 0.008136452280265537),\n",
       "  ('study', 0.007867077296007535),\n",
       "  ('improve', 0.007845629391713415),\n",
       "  ('robotic', 0.007770207652370673),\n",
       "  ('mechanism', 0.007719421374896049),\n",
       "  ('develop', 0.007552627527603197),\n",
       "  ('stiffness', 0.007498829306162359),\n",
       "  ('navigation', 0.007470953113414238),\n",
       "  ('measurement', 0.0074266782107390355),\n",
       "  ('process', 0.007379071527523501),\n",
       "  ('localization', 0.007333727233955804),\n",
       "  ('experimental', 0.007158923328938879),\n",
       "  ('solution', 0.007124934081890169),\n",
       "  ('data', 0.007085844140417165),\n",
       "  ('structure', 0.007071461065830213),\n",
       "  ('task', 0.007058397092258474),\n",
       "  ('identification', 0.007050779918573664),\n",
       "  ('application', 0.007021785231499867),\n",
       "  ('experiment', 0.007006774403402043),\n",
       "  ('weld', 0.007001233521108439),\n",
       "  ('singularity', 0.006909341082104465),\n",
       "  ('equation', 0.0067507184412801576),\n",
       "  ('workspace', 0.006729777776491915),\n",
       "  ('flexible', 0.0065856159822352866),\n",
       "  ('vision', 0.006405464768185542),\n",
       "  ('provide', 0.006378240463373191),\n",
       "  ('matrix', 0.00622654434330919),\n",
       "  ('platform', 0.006199398964514672),\n",
       "  ('solve', 0.006160241878051018),\n",
       "  ('constraint', 0.006139468198153088),\n",
       "  ('link', 0.006039538881090265),\n",
       "  ('arm', 0.006039435323278212),\n",
       "  ('compare', 0.005978950052640568),\n",
       "  ('machine', 0.005940082341773841),\n",
       "  ('apply', 0.005930537313567619),\n",
       "  ('nonlinear', 0.005915360142595797),\n",
       "  ('program', 0.005785345741652774),\n",
       "  ('optimal', 0.005738307657878553),\n",
       "  ('actuator', 0.005722834287230935),\n",
       "  ('degree', 0.005667997377044887),\n",
       "  ('space', 0.0055866701923385186),\n",
       "  ('obstacle', 0.005576042794295891),\n",
       "  ('vibration', 0.005522534162281463),\n",
       "  ('assembly', 0.005451946630484226),\n",
       "  ('reduce', 0.005413291150982079),\n",
       "  ('coordinate', 0.005391770935993269),\n",
       "  ('perform', 0.005391381167598258),\n",
       "  ('image', 0.005373882394671955),\n",
       "  ('wireless', 0.0053506470542077494),\n",
       "  ('achieve', 0.005343140313234354),\n",
       "  ('test', 0.005331997839675534),\n",
       "  ('move', 0.005323832050903292),\n",
       "  ('fuzzy', 0.005268183867282703),\n",
       "  ('soft', 0.005259675356724778),\n",
       "  ('finally', 0.0052245749892840376),\n",
       "  ('function', 0.0052237321551656425),\n",
       "  ('planning', 0.005223233338665992),\n",
       "  ('force', 0.005185296607596965),\n",
       "  ('velocity', 0.005158414127074612),\n",
       "  ('visual', 0.005148682204297692),\n",
       "  ('plan', 0.005088105649922334),\n",
       "  ('technique', 0.0050858999166576)],\n",
       " 1: [('walk', 0.06959808010972622),\n",
       "  ('gait', 0.04524301748155997),\n",
       "  ('humanoid', 0.0386168864873338),\n",
       "  ('biped', 0.03495463344192838),\n",
       "  ('leg', 0.03128893563291555),\n",
       "  ('robot', 0.03119903348542528),\n",
       "  ('model', 0.02600340689898544),\n",
       "  ('foot', 0.02584372673598373),\n",
       "  ('motion', 0.025115332249669484),\n",
       "  ('joint', 0.024134742630829622),\n",
       "  ('quadruped', 0.023714907383546122),\n",
       "  ('dynamic', 0.02183517240112683),\n",
       "  ('control', 0.02142422854475741),\n",
       "  ('locomotion', 0.0202599123506401),\n",
       "  ('human', 0.01743459903811782),\n",
       "  ('body', 0.01677460003710492),\n",
       "  ('mechanism', 0.014987013557175249),\n",
       "  ('legged', 0.014748492948992019),\n",
       "  ('pattern', 0.014558793378499078),\n",
       "  ('force', 0.014538307647248451),\n",
       "  ('design', 0.01350408076887789),\n",
       "  ('rehabilitation', 0.01337744848639448),\n",
       "  ('support', 0.013321922727745478),\n",
       "  ('propose', 0.013278415003332683),\n",
       "  ('simulation', 0.013221052444701162),\n",
       "  ('method', 0.012927382507425679),\n",
       "  ('movement', 0.012431056285024793),\n",
       "  ('paper', 0.012302979993373663),\n",
       "  ('bipedal', 0.012207200637318344),\n",
       "  ('terrain', 0.012110887795124627),\n",
       "  ('walking', 0.011992420642539539),\n",
       "  ('stability', 0.011642862006514584),\n",
       "  ('result', 0.01160551440304689),\n",
       "  ('phase', 0.011601494083122874),\n",
       "  ('base', 0.011566451929978943),\n",
       "  ('energy', 0.01151899604992391),\n",
       "  ('analysis', 0.011272775336333531),\n",
       "  ('system', 0.011165852748238832),\n",
       "  ('sensor', 0.011062906484513059),\n",
       "  ('torque', 0.010924941076664873),\n",
       "  ('trajectory', 0.0108795603814854),\n",
       "  ('zmp', 0.010767105458207405),\n",
       "  ('posture', 0.010469395341606758),\n",
       "  ('balance', 0.010201117071405013),\n",
       "  ('patient', 0.009929391555167607),\n",
       "  ('stable', 0.009928591560286016),\n",
       "  ('hexapod', 0.009775389046714517),\n",
       "  ('study', 0.009670894076019914),\n",
       "  ('kinematics', 0.009211539583911084),\n",
       "  ('limb', 0.008878363366995832),\n",
       "  ('knee', 0.008851548569493469),\n",
       "  ('contact', 0.008555851740345483),\n",
       "  ('develop', 0.008120905105566996),\n",
       "  ('parallel', 0.007847022977668438),\n",
       "  ('algorithm', 0.007827894200991201),\n",
       "  ('ground', 0.007815434790731806),\n",
       "  ('kinematic', 0.007803457251471588),\n",
       "  ('upper', 0.007770016014159966),\n",
       "  ('parameter', 0.007603197908751131),\n",
       "  ('passive', 0.007575448430613372),\n",
       "  ('approach', 0.007543798545201119),\n",
       "  ('multilegged', 0.007531777827314211),\n",
       "  ('generation', 0.007473658929101595),\n",
       "  ('structure', 0.007363828755266812),\n",
       "  ('arm', 0.007214625498671331),\n",
       "  ('surface', 0.007211623481647093),\n",
       "  ('transfer', 0.0071975736663811955),\n",
       "  ('toe', 0.007189343165005021),\n",
       "  ('experiment', 0.00716599126531406),\n",
       "  ('controller', 0.007161997535258123),\n",
       "  ('exoskeleton', 0.007150190640408654),\n",
       "  ('step', 0.007141958793520599),\n",
       "  ('modeling', 0.007041772984215849),\n",
       "  ('ankle', 0.006958630740207392),\n",
       "  ('perform', 0.006853098329107746),\n",
       "  ('generate', 0.006742150643513599),\n",
       "  ('angle', 0.006720843997511857),\n",
       "  ('optimization', 0.006679798218496432),\n",
       "  ('stroke', 0.006674182747826913),\n",
       "  ('moment', 0.006655636184112373),\n",
       "  ('fall', 0.006601002946098745),\n",
       "  ('consumption', 0.006369819476065657),\n",
       "  ('experimental', 0.006363925856376363),\n",
       "  ('analyze', 0.0063621835846903495),\n",
       "  ('environment', 0.006352280629088756),\n",
       "  ('muscle', 0.00633427500835591),\n",
       "  ('plan', 0.0062753900166325205),\n",
       "  ('provide', 0.006273839216917496),\n",
       "  ('data', 0.006228552379359098),\n",
       "  ('hip', 0.006226967397317779),\n",
       "  ('therapy', 0.006188307959936552),\n",
       "  ('optimal', 0.006181710149162907),\n",
       "  ('walker', 0.006173797691422905),\n",
       "  ('subject', 0.006150740636263816),\n",
       "  ('type', 0.006097818612136666),\n",
       "  ('equation', 0.006083873006452794),\n",
       "  ('compare', 0.006077186899595987),\n",
       "  ('inverse', 0.006060426447128082),\n",
       "  ('low', 0.006048574898259954),\n",
       "  ('performance', 0.006008369785846914)],\n",
       " 2: [('cable', 0.1106704273207453),\n",
       "  ('cabledriven', 0.08965552788162695),\n",
       "  ('parallel', 0.046884419943110205),\n",
       "  ('cdpr', 0.03687876726566766),\n",
       "  ('cdprs', 0.03263617325364518),\n",
       "  ('workspace', 0.03189434962373858),\n",
       "  ('tension', 0.03182855149268422),\n",
       "  ('robot', 0.025061307333396784),\n",
       "  ('control', 0.021275680840151155),\n",
       "  ('analysis', 0.018020598253954353),\n",
       "  ('design', 0.017867591079756467),\n",
       "  ('dynamic', 0.017635689198305618),\n",
       "  ('propose', 0.01747330760622248),\n",
       "  ('method', 0.01743402473207725),\n",
       "  ('model', 0.016508086774609017),\n",
       "  ('endeffector', 0.015993017037421103),\n",
       "  ('paper', 0.015462706761923083),\n",
       "  ('drive', 0.015016258213550512),\n",
       "  ('stiffness', 0.01475067702717038),\n",
       "  ('cablesuspended', 0.014696318898548633),\n",
       "  ('vibration', 0.014489761868463331),\n",
       "  ('planar', 0.013705867693020679),\n",
       "  ('result', 0.013243061346332378),\n",
       "  ('system', 0.01312448059163305),\n",
       "  ('manipulator', 0.013013183419807013),\n",
       "  ('base', 0.012440622265784762),\n",
       "  ('simulation', 0.012355135295856802),\n",
       "  ('suspend', 0.01202865854744496),\n",
       "  ('platform', 0.011990235394011202),\n",
       "  ('controller', 0.011845560741384367),\n",
       "  ('trajectory', 0.011208182246324099),\n",
       "  ('algorithm', 0.010577310180968125),\n",
       "  ('study', 0.010449361365882877),\n",
       "  ('optimization', 0.010328483602212874),\n",
       "  ('motion', 0.010238558193144353),\n",
       "  ('mechanism', 0.010039609725901616),\n",
       "  ('kinematics', 0.009887978233681247),\n",
       "  ('kinematic', 0.00983255958562849),\n",
       "  ('static', 0.009733909001907256),\n",
       "  ('pulley', 0.009536864803307598),\n",
       "  ('underconstrained', 0.009290896924544214),\n",
       "  ('wrench', 0.009201018583282768),\n",
       "  ('length', 0.008856430479312553),\n",
       "  ('move', 0.008676176022789611),\n",
       "  ('optimal', 0.00866288409153612),\n",
       "  ('experimental', 0.008548429659464224),\n",
       "  ('force', 0.008521648926889593),\n",
       "  ('performance', 0.008516387002559533),\n",
       "  ('parameter', 0.008461128359609068),\n",
       "  ('adaptive', 0.008396347680638589),\n",
       "  ('equation', 0.008279841827576231),\n",
       "  ('wire', 0.008235251603020575),\n",
       "  ('feedback', 0.008135858299963094),\n",
       "  ('payload', 0.00811336592401325),\n",
       "  ('error', 0.008055066761677852),\n",
       "  ('track', 0.008036288993913846),\n",
       "  ('configuration', 0.007949871063057052),\n",
       "  ('analyze', 0.007892033444155457),\n",
       "  ('feasible', 0.007841286149897915),\n",
       "  ('position', 0.00782529605529099),\n",
       "  ('compare', 0.007787028684289266),\n",
       "  ('set', 0.007682841018224247),\n",
       "  ('apply', 0.007618827447856524),\n",
       "  ('redundant', 0.007593490189714407),\n",
       "  ('rigid', 0.007528651206055284),\n",
       "  ('approach', 0.007526481434757137),\n",
       "  ('accuracy', 0.007483924748287564),\n",
       "  ('collision', 0.007481716418108182),\n",
       "  ('stability', 0.007333769016433153),\n",
       "  ('finally', 0.007207832747815016),\n",
       "  ('actuator', 0.007161478831188931),\n",
       "  ('actuate', 0.007050650820235574),\n",
       "  ('winch', 0.007047097831009719),\n",
       "  ('calibration', 0.007045021144696887),\n",
       "  ('frequency', 0.0070406418481867615),\n",
       "  ('orientation', 0.006936572368078649),\n",
       "  ('structure', 0.006906109286742981),\n",
       "  ('perform', 0.006804226452364626),\n",
       "  ('distribution', 0.006744170264532894),\n",
       "  ('reconfigurable', 0.006714074133143801),\n",
       "  ('spatial', 0.006673712954149096),\n",
       "  ('mass', 0.006449962023396279),\n",
       "  ('linear', 0.006444233909716072),\n",
       "  ('flexible', 0.0064267985027353595),\n",
       "  ('experiment', 0.00626368815856759),\n",
       "  ('linearization', 0.00622859468597261),\n",
       "  ('require', 0.006205984651802278),\n",
       "  ('scheme', 0.0061853934703312765),\n",
       "  ('mobile', 0.006183837508403848),\n",
       "  ('improve', 0.006163693185356019),\n",
       "  ('constraint', 0.006161856104037243),\n",
       "  ('pose', 0.006090279277237516),\n",
       "  ('introduce', 0.006086027954079405),\n",
       "  ('provide', 0.006075736473318127),\n",
       "  ('low', 0.005976498482403073),\n",
       "  ('advantage', 0.005902418845112268),\n",
       "  ('develop', 0.005853134968673945),\n",
       "  ('determine', 0.005842852147457353),\n",
       "  ('uncertainty', 0.005834741883796735),\n",
       "  ('application', 0.005790977939891835)],\n",
       " 3: [('swarm', 0.11078415678924677),\n",
       "  ('selfassembly', 0.0980838748068141),\n",
       "  ('dock', 0.04211573904213635),\n",
       "  ('modular', 0.03972811293106171),\n",
       "  ('robot', 0.03368764075204649),\n",
       "  ('selfassembling', 0.03363605762215643),\n",
       "  ('distribute', 0.029640833562666575),\n",
       "  ('collective', 0.02588118211012556),\n",
       "  ('module', 0.02551994504950863),\n",
       "  ('robotics', 0.0250842985570118),\n",
       "  ('algorithm', 0.02275244590620619),\n",
       "  ('sort', 0.02030904051597505),\n",
       "  ('shape', 0.019297685655393672),\n",
       "  ('sambot', 0.018214805392675896),\n",
       "  ('autonomous', 0.018177938757115552),\n",
       "  ('system', 0.017799594035154246),\n",
       "  ('task', 0.01713324073093408),\n",
       "  ('formation', 0.01674676512827799),\n",
       "  ('structure', 0.016641162058592736),\n",
       "  ('individual', 0.0163566372234419),\n",
       "  ('experiment', 0.015570375776008746),\n",
       "  ('robotic', 0.015134967538278664),\n",
       "  ('aggregation', 0.014514073367134147),\n",
       "  ('model', 0.014434140323594559),\n",
       "  ('approach', 0.014338797811953628),\n",
       "  ('configuration', 0.014232656460454697),\n",
       "  ('selfreconfigurable', 0.014130827060287041),\n",
       "  ('multirobot', 0.013858767195367647),\n",
       "  ('communication', 0.013757691014030678),\n",
       "  ('mechanism', 0.0137272186021294),\n",
       "  ('assemble', 0.013717703450411364),\n",
       "  ('form', 0.013592302146447308),\n",
       "  ('agent', 0.013377051168421255),\n",
       "  ('selfreconfiguration', 0.01332398948061601),\n",
       "  ('selfassemble', 0.01332398948061601),\n",
       "  ('behavior', 0.013141815102112596),\n",
       "  ('connect', 0.013083177805192638),\n",
       "  ('control', 0.012702004812982039),\n",
       "  ('paper', 0.012685351026380484),\n",
       "  ('result', 0.01254308953195675),\n",
       "  ('locomotion', 0.012320454987449733),\n",
       "  ('evolutionary', 0.01214409187512846),\n",
       "  ('strategy', 0.012090724025030154),\n",
       "  ('selfrepair', 0.012027870164257017),\n",
       "  ('design', 0.012025358156061141),\n",
       "  ('process', 0.01197835258068185),\n",
       "  ('morphology', 0.011797255969231129),\n",
       "  ('microscopic', 0.011103324567180007),\n",
       "  ('transport', 0.01091537528999609),\n",
       "  ('simulation', 0.010890113335735021),\n",
       "  ('evolution', 0.01065204084469309),\n",
       "  ('target', 0.010555867560306161),\n",
       "  ('environment', 0.010412468254694976),\n",
       "  ('morphogenesis', 0.010036680904990805),\n",
       "  ('demonstrate', 0.00998629046030977),\n",
       "  ('simple', 0.009934261164934946),\n",
       "  ('mobile', 0.009899923848946234),\n",
       "  ('aggregate', 0.009859636809504108),\n",
       "  ('require', 0.009799897538488285),\n",
       "  ('physical', 0.00937851298742465),\n",
       "  ('multiple', 0.009375614320356138),\n",
       "  ('forage', 0.009311234430975387),\n",
       "  ('assembly', 0.009269368671794717),\n",
       "  ('macroscopic', 0.009177638619724895),\n",
       "  ('size', 0.009115957430297871),\n",
       "  ('propose', 0.009063354538378539),\n",
       "  ('capability', 0.009033531509175387),\n",
       "  ('decentralize', 0.008997920711673588),\n",
       "  ('autonomously', 0.00887520987539007),\n",
       "  ('growth', 0.008809682915176231),\n",
       "  ('study', 0.008753023579633337),\n",
       "  ('inspire', 0.008689049353110295),\n",
       "  ('swarmbot', 0.008672335514678772),\n",
       "  ('intelligence', 0.008474800356112647),\n",
       "  ('reconfiguration', 0.00845942051710008),\n",
       "  ('performance', 0.008428405092184019),\n",
       "  ('local', 0.008366145607159621),\n",
       "  ('base', 0.008215447680025115),\n",
       "  ('level', 0.008208188979055434),\n",
       "  ('capable', 0.008174470532431139),\n",
       "  ('complex', 0.008143581071436385),\n",
       "  ('pattern', 0.008139500100445006),\n",
       "  ('paint', 0.008016278078441474),\n",
       "  ('ant', 0.008006435636694316),\n",
       "  ('sbots', 0.007977180794678384),\n",
       "  ('cellular', 0.007945729598973751),\n",
       "  ('evolve', 0.007915330361528179),\n",
       "  ('time', 0.007890493482593696),\n",
       "  ('construction', 0.007873530019782356),\n",
       "  ('method', 0.007756347394068737),\n",
       "  ('environmental', 0.007697587993238739),\n",
       "  ('perform', 0.007666947465950465),\n",
       "  ('controller', 0.007665159738611552),\n",
       "  ('asynchronous', 0.007615711159733533),\n",
       "  ('search', 0.007517849445344138),\n",
       "  ('real', 0.007487659376442585),\n",
       "  ('scalability', 0.007413082701127792),\n",
       "  ('hardware', 0.007347302608119904),\n",
       "  ('behaviour', 0.007333563752468939),\n",
       "  ('achieve', 0.00727703883519082)],\n",
       " 4: [('underwater', 0.10271185838794183),\n",
       "  ('fish', 0.0763817040636249),\n",
       "  ('water', 0.04651292206672343),\n",
       "  ('model', 0.04535996670527364),\n",
       "  ('swim', 0.044492534609608864),\n",
       "  ('amphibious', 0.036947723551469275),\n",
       "  ('hydrodynamic', 0.0341337510268934),\n",
       "  ('dynamic', 0.033764730976617585),\n",
       "  ('robot', 0.025720551348632284),\n",
       "  ('motion', 0.025447203381300056),\n",
       "  ('simulation', 0.024705459036364723),\n",
       "  ('propulsion', 0.023825529490837143),\n",
       "  ('fin', 0.022407089690105964),\n",
       "  ('robotic', 0.022226849499948798),\n",
       "  ('control', 0.02084332190828799),\n",
       "  ('locomotion', 0.019556469202110318),\n",
       "  ('hydrodynamics', 0.019240633609208885),\n",
       "  ('vehicle', 0.019132735775242878),\n",
       "  ('thruster', 0.018943031628385766),\n",
       "  ('tail', 0.018901254392087292),\n",
       "  ('thrust', 0.018613694914716514),\n",
       "  ('design', 0.01724731719253176),\n",
       "  ('modeling', 0.016562871554994064),\n",
       "  ('analysis', 0.016326990661211894),\n",
       "  ('force', 0.016239598967671142),\n",
       "  ('body', 0.015764835683927052),\n",
       "  ('mechanism', 0.015446861453554422),\n",
       "  ('paper', 0.015412491924734307),\n",
       "  ('system', 0.015139028524391314),\n",
       "  ('manipulator', 0.015008334855411396),\n",
       "  ('result', 0.014968775764958918),\n",
       "  ('base', 0.01365850072439224),\n",
       "  ('parameter', 0.013312981500170342),\n",
       "  ('leg', 0.013142932645229007),\n",
       "  ('caudal', 0.013012138911474432),\n",
       "  ('fluid', 0.012856676072400186),\n",
       "  ('experimental', 0.012629684771351178),\n",
       "  ('propose', 0.012305292390795301),\n",
       "  ('soft', 0.011830280488046857),\n",
       "  ('speed', 0.011762966533144832),\n",
       "  ('biomimetic', 0.011760392688919742),\n",
       "  ('develop', 0.011740179409353025),\n",
       "  ('landyacht', 0.011485424654882535),\n",
       "  ('spherical', 0.011252132096642458),\n",
       "  ('experiment', 0.011099663066273692),\n",
       "  ('kinematics', 0.011087850620408329),\n",
       "  ('analyze', 0.011000501889332983),\n",
       "  ('mathematical', 0.010992241314249748),\n",
       "  ('structure', 0.010711816319224752),\n",
       "  ('eellike', 0.010601930450660801),\n",
       "  ('behavior', 0.010411455566856728),\n",
       "  ('bionic', 0.010364455473788666),\n",
       "  ('kinematic', 0.01036033473386866),\n",
       "  ('test', 0.01030125029530955),\n",
       "  ('joint', 0.010235005418588716),\n",
       "  ('performance', 0.010152634129431072),\n",
       "  ('propel', 0.010092210312761845),\n",
       "  ('equation', 0.010073429641205183),\n",
       "  ('forward', 0.009657763454748239),\n",
       "  ('hind', 0.009542235201747918),\n",
       "  ('maneuverability', 0.009468938116326679),\n",
       "  ('verify', 0.00936101120860166),\n",
       "  ('method', 0.009351433225042626),\n",
       "  ('multimode', 0.00921330124889796),\n",
       "  ('fishlike', 0.009128646197180113),\n",
       "  ('prototype', 0.009085163998027342),\n",
       "  ('demonstrate', 0.008927937973640951),\n",
       "  ('glide', 0.008924543263354436),\n",
       "  ('land', 0.00861738204069782),\n",
       "  ('drag', 0.008534663513543374),\n",
       "  ('pitch', 0.008518983470558475),\n",
       "  ('controller', 0.008513598653490408),\n",
       "  ('paddle', 0.008410175260634872),\n",
       "  ('study', 0.00839218421587865),\n",
       "  ('trajectory', 0.008170542831949837),\n",
       "  ('swimming', 0.008119753330148848),\n",
       "  ('bladder', 0.008119753330148848),\n",
       "  ('ocean', 0.008119753330148848),\n",
       "  ('characteristic', 0.008095221934011161),\n",
       "  ('strider', 0.007951447837995602),\n",
       "  ('cfd', 0.007951447837995602),\n",
       "  ('nonlinear', 0.007882075643878321),\n",
       "  ('qualitative', 0.007836189991619474),\n",
       "  ('response', 0.007778373413280698),\n",
       "  ('inspire', 0.007603676565526931),\n",
       "  ('seabed', 0.00750276995761364),\n",
       "  ('auv', 0.00742149218219632),\n",
       "  ('validate', 0.0073417293446500515),\n",
       "  ('multibody', 0.007327032800854277),\n",
       "  ('velocity', 0.00732440256661164),\n",
       "  ('drive', 0.0073155397496800344),\n",
       "  ('stroke', 0.007258513641185774),\n",
       "  ('simulate', 0.007221837856049823),\n",
       "  ('actuator', 0.007182223437903218),\n",
       "  ('compliant', 0.007147901790921554),\n",
       "  ('focus', 0.0070981370599656115),\n",
       "  ('newtoneuler', 0.007025906708658166),\n",
       "  ('sea', 0.006983110124703026),\n",
       "  ('robotics', 0.006982319005438492),\n",
       "  ('yaw', 0.006935658121319163)],\n",
       " 5: [('user', 0.0564364050235032),\n",
       "  ('social', 0.05510337389225523),\n",
       "  ('interaction', 0.046902876822544674),\n",
       "  ('emotion', 0.04630788363576907),\n",
       "  ('language', 0.041562979648269625),\n",
       "  ('human', 0.041303018617232734),\n",
       "  ('natural', 0.03950329570505874),\n",
       "  ('emotional', 0.03674331680251945),\n",
       "  ('humanrobot', 0.03481476392318768),\n",
       "  ('robot', 0.03200551385220321),\n",
       "  ('behavior', 0.028743001336982925),\n",
       "  ('gaze', 0.028377779457044262),\n",
       "  ('voice', 0.02801297608750645),\n",
       "  ('dialogue', 0.027641681309742115),\n",
       "  ('speech', 0.02448524858410425),\n",
       "  ('command', 0.022940769021104406),\n",
       "  ('intention', 0.022939417588684573),\n",
       "  ('model', 0.02254328990793048),\n",
       "  ('communication', 0.02233556034728737),\n",
       "  ('people', 0.019258479523978113),\n",
       "  ('attention', 0.018634644208416366),\n",
       "  ('engagement', 0.017965333859525808),\n",
       "  ('system', 0.01733854494873964),\n",
       "  ('study', 0.017336811616527146),\n",
       "  ('task', 0.016466925655247155),\n",
       "  ('interface', 0.0162832082259522),\n",
       "  ('service', 0.01618808179478245),\n",
       "  ('process', 0.015921559302678377),\n",
       "  ('perceptual', 0.015581616991859596),\n",
       "  ('understand', 0.015289801831968423),\n",
       "  ('participant', 0.015027874659136254),\n",
       "  ('context', 0.014905359682773046),\n",
       "  ('recognition', 0.014727338288135614),\n",
       "  ('knowledge', 0.014203772634356432),\n",
       "  ('perception', 0.014188301288913484),\n",
       "  ('evaluate', 0.013824036474038601),\n",
       "  ('child', 0.013573898246466765),\n",
       "  ('approach', 0.01357235372481887),\n",
       "  ('expression', 0.013085192519187107),\n",
       "  ('linguistic', 0.012985720900347428),\n",
       "  ('industrial', 0.012606214413593102),\n",
       "  ('paper', 0.012605941692987963),\n",
       "  ('personality', 0.012450099792524297),\n",
       "  ('instruction', 0.01228054525805849),\n",
       "  ('socially', 0.0122186639653574),\n",
       "  ('base', 0.012104636216259073),\n",
       "  ('guide', 0.01197404277300341),\n",
       "  ('semantic', 0.011542163046841995),\n",
       "  ('experiment', 0.011346293247266607),\n",
       "  ('develop', 0.011151547033382194),\n",
       "  ('agent', 0.011083461239538567),\n",
       "  ('space', 0.011052873168147048),\n",
       "  ('autonomous', 0.010919371982069354),\n",
       "  ('cue', 0.010871782279063272),\n",
       "  ('result', 0.010763648510888619),\n",
       "  ('care', 0.010613450017135036),\n",
       "  ('situation', 0.010487391210334812),\n",
       "  ('design', 0.010401920667492116),\n",
       "  ('hri', 0.010302077506415581),\n",
       "  ('dialog', 0.010107073238543925),\n",
       "  ('affective', 0.010107073238543925),\n",
       "  ('nlp', 0.01001788859059592),\n",
       "  ('mission', 0.009865097413026082),\n",
       "  ('movement', 0.009793464680165925),\n",
       "  ('processing', 0.009759202182799794),\n",
       "  ('ambiguity', 0.009582984644069656),\n",
       "  ('role', 0.00951399927186251),\n",
       "  ('experience', 0.009418622305514676),\n",
       "  ('intent', 0.009357659028572642),\n",
       "  ('interact', 0.009296859233994906),\n",
       "  ('cognitive', 0.009265513290588402),\n",
       "  ('touch', 0.009071863529292186),\n",
       "  ('conversation', 0.008960092308481347),\n",
       "  ('strategy', 0.008938856467780799),\n",
       "  ('focus', 0.008849201409037484),\n",
       "  ('storytelling', 0.008736764019568598),\n",
       "  ('communicative', 0.008736764019568598),\n",
       "  ('team', 0.008729515309027751),\n",
       "  ('collaborative', 0.008660544961128268),\n",
       "  ('provide', 0.00864967444435056),\n",
       "  ('interactive', 0.008486507754798749),\n",
       "  ('humanoid', 0.008482019414199307),\n",
       "  ('utterance', 0.00843246581325883),\n",
       "  ('verbal', 0.00843246581325883),\n",
       "  ('implement', 0.008393948069651814),\n",
       "  ('handle', 0.008248406768716961),\n",
       "  ('framework', 0.008245949852778992),\n",
       "  ('fuzzy', 0.008015782546136073),\n",
       "  ('customer', 0.007984646027333392),\n",
       "  ('propose', 0.0079357583304919),\n",
       "  ('distance', 0.007929290228901837),\n",
       "  ('control', 0.00791793838656896),\n",
       "  ('navigation', 0.007796204529852112),\n",
       "  ('vocal', 0.007766012461838752),\n",
       "  ('method', 0.007654381035486437),\n",
       "  ('corpus', 0.00757733335822862),\n",
       "  ('factor', 0.007450178857565187),\n",
       "  ('route', 0.007410118208710911),\n",
       "  ('concept', 0.00740326761146693),\n",
       "  ('object', 0.007365275043070274)],\n",
       " 6: [('fault', 0.13538434308011485),\n",
       "  ('diagnosis', 0.08407396224146682),\n",
       "  ('industrial', 0.05908064736393618),\n",
       "  ('signal', 0.03849202340781488),\n",
       "  ('maintenance', 0.03400158673387218),\n",
       "  ('data', 0.03184911210167416),\n",
       "  ('detection', 0.03072443881375094),\n",
       "  ('robot', 0.030641130047831425),\n",
       "  ('failure', 0.02977815740394245),\n",
       "  ('health', 0.025846905910989353),\n",
       "  ('method', 0.02566332365805516),\n",
       "  ('spectrum', 0.023228954977785515),\n",
       "  ('reducer', 0.022005651848236864),\n",
       "  ('feature', 0.02116526299088642),\n",
       "  ('detect', 0.020844345937354302),\n",
       "  ('vibration', 0.0205870602746394),\n",
       "  ('monitor', 0.019820477197927126),\n",
       "  ('anomaly', 0.01947409375245006),\n",
       "  ('propose', 0.018917479988041414),\n",
       "  ('condition', 0.018622670363100648),\n",
       "  ('degradation', 0.018439071002598117),\n",
       "  ('network', 0.017536528268388876),\n",
       "  ('analysis', 0.016567167202171308),\n",
       "  ('system', 0.01616944715012304),\n",
       "  ('domain', 0.01604063367606401),\n",
       "  ('reliability', 0.015899712504360827),\n",
       "  ('convolutional', 0.01578519260021882),\n",
       "  ('encoder', 0.014897310181073676),\n",
       "  ('oscillation', 0.014895244427879333),\n",
       "  ('predictive', 0.01487938404739574),\n",
       "  ('machine', 0.014705970293112568),\n",
       "  ('neural', 0.014357300109522917),\n",
       "  ('ssa', 0.01421708386795071),\n",
       "  ('base', 0.014185355084569416),\n",
       "  ('autoencoder', 0.014174687063355135),\n",
       "  ('production', 0.013924199956470472),\n",
       "  ('current', 0.013492091957012228),\n",
       "  ('model', 0.013296987605971984),\n",
       "  ('learn', 0.012995248353346466),\n",
       "  ('trend', 0.012939494389945516),\n",
       "  ('classification', 0.012730031464790518),\n",
       "  ('joint', 0.012684843642054121),\n",
       "  ('deep', 0.012633082858423518),\n",
       "  ('crack', 0.012477779962151964),\n",
       "  ('component', 0.011657712212696856),\n",
       "  ('intelligent', 0.011256892708777269),\n",
       "  ('loss', 0.011133487608496697),\n",
       "  ('frequency', 0.010933761505535234),\n",
       "  ('monitoring', 0.010927787875165261),\n",
       "  ('prediction', 0.010924924776313787),\n",
       "  ('diagnose', 0.010720540223515032),\n",
       "  ('transform', 0.010666426004916917),\n",
       "  ('operation', 0.010501155494904728),\n",
       "  ('time', 0.010352489539223237),\n",
       "  ('multijoint', 0.010342667602619688),\n",
       "  ('result', 0.01032467729334339),\n",
       "  ('approach', 0.010309032854741232),\n",
       "  ('emd', 0.010277359909737242),\n",
       "  ('improve', 0.010001472881108817),\n",
       "  ('industry', 0.009934118171967167),\n",
       "  ('bear', 0.009822509328546078),\n",
       "  ('performance', 0.009772962654109893),\n",
       "  ('harmonic', 0.009684504209186746),\n",
       "  ('equipment', 0.009678625405458701),\n",
       "  ('rotary', 0.009623946744522343),\n",
       "  ('technique', 0.009597454660483676),\n",
       "  ('accuracy', 0.009394211820055474),\n",
       "  ('paper', 0.009377631613325492),\n",
       "  ('study', 0.009354578992752625),\n",
       "  ('wavelet', 0.009321212276000742),\n",
       "  ('sensor', 0.009139538269327535),\n",
       "  ('decomposition', 0.009136773587034625),\n",
       "  ('factory', 0.009113511033523087),\n",
       "  ('attitude', 0.009113041897846726),\n",
       "  ('characteristic', 0.009082156373526266),\n",
       "  ('gearbox', 0.008912395781877904),\n",
       "  ('real', 0.008827328997662906),\n",
       "  ('bearing', 0.008677772556465521),\n",
       "  ('threshold', 0.00866479637001635),\n",
       "  ('status', 0.008660601011418025),\n",
       "  ('technology', 0.008656706870319945),\n",
       "  ('transmission', 0.008621622181125908),\n",
       "  ('compare', 0.008428982525648903),\n",
       "  ('process', 0.008350203511138507),\n",
       "  ('life', 0.008276119099380363),\n",
       "  ('extraction', 0.008161440288198655),\n",
       "  ('extract', 0.007999819503687689),\n",
       "  ('unsupervised', 0.007915001756506142),\n",
       "  ('experimental', 0.007907239440230598),\n",
       "  ('datadriven', 0.007831556747357074),\n",
       "  ('manufacturing', 0.007791951852904843),\n",
       "  ('faulty', 0.0077273234576043254),\n",
       "  ('methodology', 0.0077252918291719624),\n",
       "  ('motor', 0.007721555191637811),\n",
       "  ('lstm', 0.007693334670354244),\n",
       "  ('traditional', 0.007630290367993857),\n",
       "  ('collect', 0.007539239189062867),\n",
       "  ('identify', 0.00753399638354655),\n",
       "  ('flaw', 0.007526691459503317),\n",
       "  ('empirical', 0.007515250139871784)],\n",
       " 7: [('finger', 0.14817110787950308),\n",
       "  ('grasp', 0.1473160079386677),\n",
       "  ('hand', 0.13815220660815727),\n",
       "  ('selfadaptive', 0.06310601690765782),\n",
       "  ('object', 0.05335985421214273),\n",
       "  ('tactile', 0.04669664186666585),\n",
       "  ('underactuated', 0.0389454617732463),\n",
       "  ('pinch', 0.0356623764732116),\n",
       "  ('mode', 0.03388045300354316),\n",
       "  ('slip', 0.03269496788214694),\n",
       "  ('mechanism', 0.027708213405514267),\n",
       "  ('fingertip', 0.024972740252358176),\n",
       "  ('sensor', 0.024225375964540632),\n",
       "  ('contact', 0.02380184597199459),\n",
       "  ('model', 0.02344135898551083),\n",
       "  ('multifingered', 0.02238745697438537),\n",
       "  ('paper', 0.02152991232994223),\n",
       "  ('robot', 0.02149422791881096),\n",
       "  ('couple', 0.021481425115093485),\n",
       "  ('design', 0.020468068609330616),\n",
       "  ('joint', 0.02024380475970062),\n",
       "  ('robotic', 0.0189903767098783),\n",
       "  ('distal', 0.017909965579508295),\n",
       "  ('grasping', 0.01768055940556639),\n",
       "  ('anthropomorphic', 0.017658775672716554),\n",
       "  ('spring', 0.017249009807595625),\n",
       "  ('phalanx', 0.017224328084156734),\n",
       "  ('switch', 0.016627390508745968),\n",
       "  ('control', 0.016081470738817646),\n",
       "  ('parallel', 0.015776250891380583),\n",
       "  ('propose', 0.015084597014249386),\n",
       "  ('method', 0.014960932567605575),\n",
       "  ('dexterous', 0.014944628310930278),\n",
       "  ('humanoid', 0.014595513767257016),\n",
       "  ('base', 0.014206558903828862),\n",
       "  ('pasa', 0.014193240971252782),\n",
       "  ('cosa', 0.014193240971252782),\n",
       "  ('force', 0.013935261253808775),\n",
       "  ('gripper', 0.013523414610727766),\n",
       "  ('shape', 0.013361956997715635),\n",
       "  ('manipulation', 0.012905149738600338),\n",
       "  ('soft', 0.012689510501072043),\n",
       "  ('gear', 0.012638019516359612),\n",
       "  ('result', 0.012023636654639212),\n",
       "  ('motion', 0.011922140420887307),\n",
       "  ('transmission', 0.011174548490178576),\n",
       "  ('apple', 0.01116576558098655),\n",
       "  ('envelop', 0.01098544052824281),\n",
       "  ('simulation', 0.01094387422093818),\n",
       "  ('drive', 0.010938054781221116),\n",
       "  ('kinematics', 0.01032584274066601),\n",
       "  ('sense', 0.010305678042567944),\n",
       "  ('experimental', 0.010132696970312254),\n",
       "  ('analysis', 0.010053653339969234),\n",
       "  ('develop', 0.009994337623692317),\n",
       "  ('surface', 0.009816286238944129),\n",
       "  ('task', 0.009613869517493295),\n",
       "  ('silkworm', 0.009538642978094047),\n",
       "  ('parallelpinching', 0.009538642978094047),\n",
       "  ('pasagb', 0.009538642978094047),\n",
       "  ('pair', 0.00946343210978945),\n",
       "  ('linear', 0.009269343491394095),\n",
       "  ('stickslip', 0.009220795145632147),\n",
       "  ('experiment', 0.009190464133990228),\n",
       "  ('imc', 0.008934548356699004),\n",
       "  ('system', 0.00885740290682932),\n",
       "  ('human', 0.008752453322326399),\n",
       "  ('sma', 0.008720111729620054),\n",
       "  ('roll', 0.008688638417497233),\n",
       "  ('linkage', 0.008667941007912822),\n",
       "  ('stability', 0.008661429034362466),\n",
       "  ('dynamic', 0.00849311151106415),\n",
       "  ('phalange', 0.00832407885404125),\n",
       "  ('linearly', 0.008048254557830316),\n",
       "  ('hybrid', 0.008013606770766306),\n",
       "  ('grip', 0.007848344743429578),\n",
       "  ('introduce', 0.007841241464189212),\n",
       "  ('consist', 0.007734523563231482),\n",
       "  ('position', 0.0076142542844594785),\n",
       "  ('manipulate', 0.0075908983814533095),\n",
       "  ('perform', 0.007435740257152139),\n",
       "  ('signal', 0.007352859572766519),\n",
       "  ('motor', 0.00727049221019164),\n",
       "  ('mathematical', 0.007255756783342796),\n",
       "  ('traditional', 0.007152049404261491),\n",
       "  ('softfinger', 0.0070827067007425155),\n",
       "  ('dgm', 0.0070827067007425155),\n",
       "  ('pacssa', 0.0070827067007425155),\n",
       "  ('linearparallel', 0.0070827067007425155),\n",
       "  ('lpsa', 0.0070827067007425155),\n",
       "  ('mechanical', 0.007036430246258747),\n",
       "  ('tendon', 0.006991736058721605),\n",
       "  ('study', 0.006969062898371259),\n",
       "  ('material', 0.00696174209914264),\n",
       "  ('switchable', 0.006936732378367708),\n",
       "  ('alloy', 0.0069277861307725525),\n",
       "  ('memory', 0.0069056333421043635),\n",
       "  ('development', 0.006904231911022314),\n",
       "  ('actuator', 0.006847881198000826),\n",
       "  ('provide', 0.006797984294798009)],\n",
       " 8: [('snake', 0.17155499451178313),\n",
       "  ('snakelike', 0.10293732513494715),\n",
       "  ('locomotion', 0.06610585345282648),\n",
       "  ('gait', 0.041366539150684216),\n",
       "  ('robot', 0.037000267177534525),\n",
       "  ('model', 0.033665824130986045),\n",
       "  ('joint', 0.03330107731141361),\n",
       "  ('motion', 0.028564538611526434),\n",
       "  ('dynamic', 0.023377512633980985),\n",
       "  ('nonsmooth', 0.022136695210946467),\n",
       "  ('serpentine', 0.022083486829845247),\n",
       "  ('constraint', 0.021276474638752547),\n",
       "  ('link', 0.020804150855808924),\n",
       "  ('control', 0.0207620407275673),\n",
       "  ('design', 0.019168559545107784),\n",
       "  ('method', 0.018958324273298105),\n",
       "  ('simulation', 0.018537416245652902),\n",
       "  ('equation', 0.016727894133947634),\n",
       "  ('force', 0.016719793280991227),\n",
       "  ('undulation', 0.016132842429660475),\n",
       "  ('nonholonomic', 0.01610424529470051),\n",
       "  ('contact', 0.01539887333503331),\n",
       "  ('passive', 0.015125069812055808),\n",
       "  ('spring', 0.014291142983585352),\n",
       "  ('wheel', 0.014229978096141849),\n",
       "  ('result', 0.013970843474102532),\n",
       "  ('body', 0.013923644718580876),\n",
       "  ('rectilinear', 0.013733717212183876),\n",
       "  ('experiment', 0.013709909365514385),\n",
       "  ('base', 0.013697117193391459),\n",
       "  ('movement', 0.013580746173652633),\n",
       "  ('mechanism', 0.013477639862200325),\n",
       "  ('paper', 0.013295882899812296),\n",
       "  ('move', 0.01314395807966133),\n",
       "  ('mathematical', 0.012802346941107838),\n",
       "  ('serpenoid', 0.012600019455824089),\n",
       "  ('prismatic', 0.012583603693692626),\n",
       "  ('controller', 0.012499593859353552),\n",
       "  ('head', 0.012454611750608502),\n",
       "  ('friction', 0.012239703357656227),\n",
       "  ('obstacle', 0.011936129662356413),\n",
       "  ('propose', 0.011710980686410138),\n",
       "  ('track', 0.01154222147228224),\n",
       "  ('redundancy', 0.011256251463798226),\n",
       "  ('rescue', 0.011198154726242148),\n",
       "  ('kinematics', 0.010931597503004166),\n",
       "  ('shape', 0.010930862629809175),\n",
       "  ('switch', 0.010896983177315373),\n",
       "  ('freedom', 0.01089577793530769),\n",
       "  ('actuator', 0.010874407477191546),\n",
       "  ('trajectory', 0.010824445414233304),\n",
       "  ('ground', 0.010691783347148983),\n",
       "  ('travel', 0.010679711910213547),\n",
       "  ('numerical', 0.010480369272777118),\n",
       "  ('kinematic', 0.010457532403464129),\n",
       "  ('degree', 0.010332211624183945),\n",
       "  ('narrow', 0.01029917739825158),\n",
       "  ('develop', 0.010157419185731),\n",
       "  ('curve', 0.010037326663574778),\n",
       "  ('pitch', 0.009921814747122516),\n",
       "  ('structure', 0.00991128553028755),\n",
       "  ('environment', 0.00984047101588162),\n",
       "  ('realize', 0.009647988159674006),\n",
       "  ('efficient', 0.009620145997785445),\n",
       "  ('locomote', 0.009458684289458898),\n",
       "  ('framework', 0.009388559384234368),\n",
       "  ('pea', 0.009193950529628878),\n",
       "  ('gibbsappell', 0.009177959847622106),\n",
       "  ('tension', 0.009056976947951365),\n",
       "  ('bundle', 0.009045469925934153),\n",
       "  ('change', 0.009045150048516094),\n",
       "  ('plane', 0.009009793252878678),\n",
       "  ('analysis', 0.008926756461041825),\n",
       "  ('lateral', 0.008869960219169857),\n",
       "  ('derive', 0.008834079208370768),\n",
       "  ('esnake', 0.00881240223205045),\n",
       "  ('verify', 0.008722000166190659),\n",
       "  ('bionic', 0.008718076502480387),\n",
       "  ('energy', 0.008501025476592327),\n",
       "  ('search', 0.008466630597368878),\n",
       "  ('consumption', 0.008402912925318556),\n",
       "  ('roll', 0.008362134819022276),\n",
       "  ('velocity', 0.008317257746673697),\n",
       "  ('system', 0.008126744758145694),\n",
       "  ('demonstrate', 0.008110527579309633),\n",
       "  ('kane', 0.008110376009820995),\n",
       "  ('hybrid', 0.007918135520213716),\n",
       "  ('fiber', 0.007742751754746591),\n",
       "  ('climb', 0.007638219432693769),\n",
       "  ('coulomb', 0.007570087989202889),\n",
       "  ('webots', 0.007538413704102145),\n",
       "  ('reduce', 0.00753049544052611),\n",
       "  ('obstacleaided', 0.007498206279999367),\n",
       "  ('pressureoperated', 0.007498206279999367),\n",
       "  ('enable', 0.007463568538956575),\n",
       "  ('wave', 0.007463460177996692),\n",
       "  ('yaw', 0.0073507627867694285),\n",
       "  ('analyze', 0.007286806683432994),\n",
       "  ('planar', 0.007274350792829678),\n",
       "  ('active', 0.007272832840376676)],\n",
       " 9: [('aerial', 0.13450019960050377),\n",
       "  ('fly', 0.07231461535395228),\n",
       "  ('flight', 0.056910076267631164),\n",
       "  ('model', 0.0461036243891795),\n",
       "  ('control', 0.04478127089844701),\n",
       "  ('uav', 0.0410606979838491),\n",
       "  ('rotor', 0.038958130408299894),\n",
       "  ('vehicle', 0.03568903992610755),\n",
       "  ('dynamic', 0.034347334456549944),\n",
       "  ('wing', 0.031178562349451128),\n",
       "  ('quadrotor', 0.025895479948398473),\n",
       "  ('attitude', 0.02423818711575759),\n",
       "  ('design', 0.02417796496942808),\n",
       "  ('controller', 0.023649252967001894),\n",
       "  ('hover', 0.023479511906166716),\n",
       "  ('manipulator', 0.02309672135233494),\n",
       "  ('unmanned', 0.022950936806530212),\n",
       "  ('tail', 0.021390641158488044),\n",
       "  ('system', 0.02076392109243009),\n",
       "  ('simulation', 0.020459146896867664),\n",
       "  ('robot', 0.019834627827323977),\n",
       "  ('helicopter', 0.0191420582328802),\n",
       "  ('trirotor', 0.018952651117301617),\n",
       "  ('result', 0.018796700270375073),\n",
       "  ('flap', 0.018071546959125946),\n",
       "  ('multirotor', 0.017433449645170747),\n",
       "  ('rotorcraft', 0.017043663674455756),\n",
       "  ('develop', 0.016548708022176045),\n",
       "  ('paper', 0.016428299228664216),\n",
       "  ('jetquad', 0.015892838911559126),\n",
       "  ('drone', 0.015310348778357156),\n",
       "  ('stabilization', 0.015109218340576477),\n",
       "  ('propose', 0.015107178746306646),\n",
       "  ('aerodynamic', 0.015042711033196432),\n",
       "  ('study', 0.014992990606708893),\n",
       "  ('bat', 0.014755856090723449),\n",
       "  ('derive', 0.014114122957633946),\n",
       "  ('stability', 0.013879032392786803),\n",
       "  ('nonlinear', 0.013000153341014415),\n",
       "  ('unman', 0.012884505889517272),\n",
       "  ('flyingwalking', 0.012737229844999835),\n",
       "  ('mainbody', 0.012737229844999835),\n",
       "  ('quadcopter', 0.012537375696386565),\n",
       "  ('experimental', 0.012353923434515045),\n",
       "  ('motion', 0.011730514463917485),\n",
       "  ('altitude', 0.011596646754437794),\n",
       "  ('torque', 0.011322706534808227),\n",
       "  ('motor', 0.011202117200871045),\n",
       "  ('quad', 0.011115386733240711),\n",
       "  ('pollination', 0.01091762558142843),\n",
       "  ('ram', 0.0108934366844259),\n",
       "  ('base', 0.010501490772259293),\n",
       "  ('feedback', 0.010397955548557755),\n",
       "  ('linearization', 0.010350007797441801),\n",
       "  ('structure', 0.010228455916453917),\n",
       "  ('robotic', 0.009922855000449295),\n",
       "  ('trajectory', 0.009752318687087258),\n",
       "  ('bond', 0.00954841295130852),\n",
       "  ('consist', 0.009533664235470958),\n",
       "  ('software', 0.009494723235660687),\n",
       "  ('ruav', 0.009457746073446592),\n",
       "  ('flybar', 0.009457746073446592),\n",
       "  ('ornithopter', 0.009457746073446592),\n",
       "  ('validate', 0.009347254497822206),\n",
       "  ('environment', 0.009309093998877749),\n",
       "  ('octorotor', 0.009262822277700592),\n",
       "  ('engine', 0.009230270470022508),\n",
       "  ('autonomous', 0.009222185590807657),\n",
       "  ('term', 0.009160653226268392),\n",
       "  ('aerodynamics', 0.009098021317857025),\n",
       "  ('task', 0.009093358118966338),\n",
       "  ('desire', 0.009003260592375857),\n",
       "  ('quadrotors', 0.008955268354561832),\n",
       "  ('mathematical', 0.008881422849071795),\n",
       "  ('manipulation', 0.008616312550023578),\n",
       "  ('arm', 0.008536586817589552),\n",
       "  ('uavs', 0.008521831837227878),\n",
       "  ('matlab', 0.008506878536207737),\n",
       "  ('mechanism', 0.008499905892563893),\n",
       "  ('aircraft', 0.008346148981259188),\n",
       "  ('test', 0.008249897532923685),\n",
       "  ('couple', 0.00819565064271317),\n",
       "  ('configuration', 0.008114154593449616),\n",
       "  ('jet', 0.008088456925578308),\n",
       "  ('equation', 0.008067444238579361),\n",
       "  ('adam', 0.008043202630785354),\n",
       "  ('property', 0.007989679684594027),\n",
       "  ('parallel', 0.007899934016716773),\n",
       "  ('hybrid', 0.00784725645057475),\n",
       "  ('degree', 0.007819424827985916),\n",
       "  ('lift', 0.00781052803682103),\n",
       "  ('track', 0.007799250990260369),\n",
       "  ('subcontroller', 0.007757056334780478),\n",
       "  ('hexacopter', 0.007757056334780478),\n",
       "  ('multipropeller', 0.007757056334780478),\n",
       "  ('verify', 0.0075634346501031536),\n",
       "  ('freedom', 0.007558771181425281),\n",
       "  ('force', 0.007443265292453549),\n",
       "  ('mode', 0.007427719297318023),\n",
       "  ('disturbance', 0.0073431675883015675)],\n",
       " 10: [('wheel', 0.17684030933637723),\n",
       "  ('slip', 0.08495387156043992),\n",
       "  ('mobile', 0.07441338462237007),\n",
       "  ('model', 0.04757527555738557),\n",
       "  ('terrain', 0.0438822951855875),\n",
       "  ('slippage', 0.032990247317677725),\n",
       "  ('kinematic', 0.03248974194881554),\n",
       "  ('suspension', 0.029566682834477456),\n",
       "  ('robot', 0.02954302938472732),\n",
       "  ('wmr', 0.02939459214646092),\n",
       "  ('skid', 0.02785794415873849),\n",
       "  ('kinematics', 0.026199704652992012),\n",
       "  ('motion', 0.0260043705593923),\n",
       "  ('steer', 0.025442251758273613),\n",
       "  ('uneven', 0.024851722038793357),\n",
       "  ('wmrs', 0.024135251879510516),\n",
       "  ('dynamic', 0.022986160711613315),\n",
       "  ('traction', 0.022896721149093243),\n",
       "  ('control', 0.021931381959442296),\n",
       "  ('threewheeled', 0.021859176021039557),\n",
       "  ('simulation', 0.021391515459924005),\n",
       "  ('skidsteering', 0.021218980281402823),\n",
       "  ('rover', 0.02115744821582482),\n",
       "  ('constraint', 0.020145469455077964),\n",
       "  ('nonholonomic', 0.020013240359912265),\n",
       "  ('vehicle', 0.019255738496443194),\n",
       "  ('wheelground', 0.018673113490202776),\n",
       "  ('lateral', 0.018371620091538074),\n",
       "  ('modeling', 0.016722383653984017),\n",
       "  ('track', 0.01639299795160331),\n",
       "  ('system', 0.016314343289157013),\n",
       "  ('equation', 0.01589691077100594),\n",
       "  ('result', 0.015818707811118254),\n",
       "  ('ground', 0.014236079596686992),\n",
       "  ('castor', 0.014117095600819595),\n",
       "  ('sinkage', 0.014117095600819595),\n",
       "  ('mode', 0.013971044020216846),\n",
       "  ('paper', 0.013488328275255281),\n",
       "  ('experimental', 0.013330922857696947),\n",
       "  ('design', 0.012773771582753717),\n",
       "  ('tire', 0.012750653041383623),\n",
       "  ('rough', 0.012073414067979736),\n",
       "  ('perturbation', 0.01196476829180149),\n",
       "  ('propose', 0.011907487200628718),\n",
       "  ('base', 0.011681646886260458),\n",
       "  ('estimation', 0.01166063374928285),\n",
       "  ('platform', 0.011613836456724038),\n",
       "  ('force', 0.011611347479328965),\n",
       "  ('differential', 0.011284403912481575),\n",
       "  ('rockerbogie', 0.010951442976113267),\n",
       "  ('torusshaped', 0.010951442976113267),\n",
       "  ('radius', 0.010866072661181763),\n",
       "  ('study', 0.01069686055492383),\n",
       "  ('contact', 0.010438174339734107),\n",
       "  ('roll', 0.010391881829454991),\n",
       "  ('axle', 0.010305791471658459),\n",
       "  ('mobility', 0.010263684623196075),\n",
       "  ('analysis', 0.010240204144165066),\n",
       "  ('center', 0.010225745374117415),\n",
       "  ('path', 0.010197280525155977),\n",
       "  ('performance', 0.01002909543980304),\n",
       "  ('drive', 0.010010768105526983),\n",
       "  ('concept', 0.00995135813892821),\n",
       "  ('angle', 0.009669824163105443),\n",
       "  ('velocity', 0.009647037598796747),\n",
       "  ('moo', 0.009562989781037716),\n",
       "  ('rotation', 0.009556314308734588),\n",
       "  ('method', 0.009543328399252113),\n",
       "  ('interaction', 0.00942068513827133),\n",
       "  ('locomotion', 0.009413224207035038),\n",
       "  ('drift', 0.009155897593239657),\n",
       "  ('parameter', 0.009152701753435697),\n",
       "  ('relationship', 0.009091662906194375),\n",
       "  ('analyze', 0.009055538520625326),\n",
       "  ('tilt', 0.008977883259630073),\n",
       "  ('noslip', 0.008963832212873883),\n",
       "  ('type', 0.008885906768128357),\n",
       "  ('skidsteered', 0.008823184750512247),\n",
       "  ('derive', 0.008782705296413113),\n",
       "  ('instantaneous', 0.008722108050719218),\n",
       "  ('tread', 0.008699128476664616),\n",
       "  ('coefficient', 0.008347045526401043),\n",
       "  ('dextrous', 0.008311844968078467),\n",
       "  ('characteristic', 0.00830827857380987),\n",
       "  ('account', 0.008297463960447282),\n",
       "  ('foot', 0.008216766537458384),\n",
       "  ('demonstrate', 0.008063361426509603),\n",
       "  ('algorithm', 0.00792487696100348),\n",
       "  ('hybrid', 0.0077315152049910515),\n",
       "  ('trajectory', 0.007686783342742524),\n",
       "  ('dualwheel', 0.007642645474385487),\n",
       "  ('icm', 0.007642645474385487),\n",
       "  ('discretevalued', 0.007642645474385487),\n",
       "  ('trailer', 0.007503982563565061),\n",
       "  ('orientable', 0.007454601034881798),\n",
       "  ('sandy', 0.007454601034881798),\n",
       "  ('dualmode', 0.007454601034881798),\n",
       "  ('drawbar', 0.007454601034881798),\n",
       "  ('perspective', 0.0074235544299386625),\n",
       "  ('develop', 0.007363379837443638)],\n",
       " 11: [('energy', 0.19520654531457557),\n",
       "  ('consumption', 0.12288580745700341),\n",
       "  ('power', 0.0540917491573783),\n",
       "  ('industrial', 0.04385675225413046),\n",
       "  ('robot', 0.03024776970242542),\n",
       "  ('model', 0.028937267724464644),\n",
       "  ('efficiency', 0.027828956375609035),\n",
       "  ('battery', 0.026386447434666276),\n",
       "  ('optimization', 0.024729884183854037),\n",
       "  ('save', 0.023665880058992825),\n",
       "  ('parameter', 0.023238527159094236),\n",
       "  ('system', 0.02112332084343634),\n",
       "  ('cycle', 0.02072933006678312),\n",
       "  ('cell', 0.01947264519370273),\n",
       "  ('charge', 0.018272660073625185),\n",
       "  ('energyoptimal', 0.017332524312505763),\n",
       "  ('cost', 0.017076274671574437),\n",
       "  ('trajectory', 0.016855236437190915),\n",
       "  ('reduce', 0.016416507894371837),\n",
       "  ('time', 0.015863071316223373),\n",
       "  ('industry', 0.01585101120759315),\n",
       "  ('optimal', 0.015802146513254726),\n",
       "  ('irs', 0.015721075260206822),\n",
       "  ('flow', 0.015413390902167215),\n",
       "  ('manufacturing', 0.015323514085582595),\n",
       "  ('storage', 0.01511914521904981),\n",
       "  ('mobile', 0.014617344594117732),\n",
       "  ('method', 0.014125175426642074),\n",
       "  ('endothermy', 0.013734044492783308),\n",
       "  ('optimize', 0.01362851426260956),\n",
       "  ('paper', 0.012717940573634946),\n",
       "  ('operation', 0.012711284041318634),\n",
       "  ('process', 0.012032894480312742),\n",
       "  ('motion', 0.011947304603705277),\n",
       "  ('analyze', 0.011913949127394512),\n",
       "  ('robotic', 0.0119097081002949),\n",
       "  ('result', 0.01184419071586269),\n",
       "  ('coal', 0.011788848567913174),\n",
       "  ('manufacture', 0.011572026393620479),\n",
       "  ('design', 0.011506711340794616),\n",
       "  ('efficient', 0.011185042044218775),\n",
       "  ('load', 0.011138928897385934),\n",
       "  ('hybrid', 0.01109672016484897),\n",
       "  ('operate', 0.011068437849088475),\n",
       "  ('charger', 0.010955846492156585),\n",
       "  ('consume', 0.01085202652759468),\n",
       "  ('lifetime', 0.010756005194528538),\n",
       "  ('sustainable', 0.01047897650481171),\n",
       "  ('autonomous', 0.010421647882297914),\n",
       "  ('electric', 0.010360064291831431),\n",
       "  ('tool', 0.010296748330050395),\n",
       "  ('management', 0.010262035307325272),\n",
       "  ('robotics', 0.01024285652166422),\n",
       "  ('predict', 0.010111270110029222),\n",
       "  ('speed', 0.010019569802586926),\n",
       "  ('simulation', 0.009742090805288307),\n",
       "  ('characteristic', 0.009716279211803522),\n",
       "  ('experimental', 0.009659089276835148),\n",
       "  ('propose', 0.009573742943325678),\n",
       "  ('potential', 0.009464677197818135),\n",
       "  ('production', 0.009455721284660762),\n",
       "  ('path', 0.009414797026017229),\n",
       "  ('palletizing', 0.009114742406688853),\n",
       "  ('planning', 0.009075577673099952),\n",
       "  ('main', 0.008952448203452954),\n",
       "  ('discharge', 0.008837128590843294),\n",
       "  ('gravitational', 0.008819775681280694),\n",
       "  ('focus', 0.008785764730940617),\n",
       "  ('depend', 0.008694091629039918),\n",
       "  ('electrical', 0.008681621222075745),\n",
       "  ('experiment', 0.008677060574817541),\n",
       "  ('torque', 0.008561606687704282),\n",
       "  ('payload', 0.008560483531524702),\n",
       "  ('differential', 0.008374871567249238),\n",
       "  ('require', 0.008358315148004156),\n",
       "  ('identification', 0.008344893079044144),\n",
       "  ('practical', 0.008319806873169137),\n",
       "  ('analysis', 0.00823323011073556),\n",
       "  ('perform', 0.008044162729681082),\n",
       "  ('life', 0.007905324841343864),\n",
       "  ('improve', 0.007867487554513507),\n",
       "  ('outlet', 0.007862196947384855),\n",
       "  ('provide', 0.007844504516118789),\n",
       "  ('automotive', 0.0077800439891299086),\n",
       "  ('program', 0.007745192059877958),\n",
       "  ('temperature', 0.0077066954510836075),\n",
       "  ('control', 0.007694425339457634),\n",
       "  ('fuel', 0.007630024718212948),\n",
       "  ('strategy', 0.007611353958712694),\n",
       "  ('base', 0.007611312929624814),\n",
       "  ('regenerative', 0.007532693637111293),\n",
       "  ('resource', 0.007531845572884442),\n",
       "  ('possibility', 0.007531845572884442),\n",
       "  ('unload', 0.007475646363741059),\n",
       "  ('task', 0.007395922043642966),\n",
       "  ('level', 0.007381742937839804),\n",
       "  ('limit', 0.007381742937839804),\n",
       "  ('powertrain', 0.007364273825702745),\n",
       "  ('function', 0.007355049761716316),\n",
       "  ('vehicle', 0.007343152427351643)],\n",
       " 12: [('reconfigurable', 0.1577159947652837),\n",
       "  ('parallel', 0.06838225002252431),\n",
       "  ('reconfiguration', 0.06589364808782369),\n",
       "  ('configuration', 0.05150680682076692),\n",
       "  ('degree', 0.0417393042187924),\n",
       "  ('freedom', 0.04044709627773272),\n",
       "  ('robot', 0.037165747824518834),\n",
       "  ('modular', 0.03564001297334684),\n",
       "  ('platform', 0.03367152606773797),\n",
       "  ('workspace', 0.033248418327472655),\n",
       "  ('design', 0.030937894038436276),\n",
       "  ('structure', 0.026561417918551565),\n",
       "  ('paper', 0.024293223304043172),\n",
       "  ('morph', 0.024111145006002827),\n",
       "  ('tripod', 0.023372297952247593),\n",
       "  ('module', 0.023118205640246896),\n",
       "  ('kinematic', 0.022019889526657437),\n",
       "  ('selfreconfigurable', 0.02187113014643835),\n",
       "  ('mobility', 0.02131361495344995),\n",
       "  ('kinematics', 0.02131305934069345),\n",
       "  ('deltatype', 0.021096720471931747),\n",
       "  ('reconfigurability', 0.020610503396772794),\n",
       "  ('reconfigurations', 0.019909053046552137),\n",
       "  ('mechanism', 0.019908702200349796),\n",
       "  ('change', 0.01975131247173192),\n",
       "  ('chain', 0.019746222891127232),\n",
       "  ('joint', 0.019439310550670167),\n",
       "  ('recrob', 0.019243076032815092),\n",
       "  ('limb', 0.019032566729472757),\n",
       "  ('tensegrity', 0.01896905797143401),\n",
       "  ('reconfigured', 0.01885883374171622),\n",
       "  ('manipulator', 0.01878826892626653),\n",
       "  ('analysis', 0.017993339084860203),\n",
       "  ('singularity', 0.017480015573118093),\n",
       "  ('geometry', 0.016900213458165975),\n",
       "  ('binary', 0.0165303143133353),\n",
       "  ('rppm', 0.016373350847625423),\n",
       "  ('geometrical', 0.015946782229893052),\n",
       "  ('introduce', 0.015709965497498868),\n",
       "  ('decouple', 0.015367499817308334),\n",
       "  ('contact', 0.01528433154892573),\n",
       "  ('actuator', 0.014699746459092479),\n",
       "  ('branch', 0.014568919623463971),\n",
       "  ('direct', 0.014509012192044955),\n",
       "  ('couple', 0.014188397780572671),\n",
       "  ('base', 0.01407506539305666),\n",
       "  ('revolute', 0.013887792761981545),\n",
       "  ('dof', 0.01355136983244019),\n",
       "  ('lockable', 0.013549327122452865),\n",
       "  ('planar', 0.0134407578599722),\n",
       "  ('fullresolution', 0.013429098638072387),\n",
       "  ('qrpara', 0.013429098638072387),\n",
       "  ('odin', 0.013429098638072387),\n",
       "  ('slidingonly', 0.013429098638072387),\n",
       "  ('constraint', 0.01327430553967975),\n",
       "  ('move', 0.013246899681686417),\n",
       "  ('cubic', 0.012999377277718311),\n",
       "  ('actuate', 0.01299372329550923),\n",
       "  ('task', 0.012964427029205137),\n",
       "  ('permutation', 0.012828717355210061),\n",
       "  ('topology', 0.012520117727897998),\n",
       "  ('motion', 0.012329852115165397),\n",
       "  ('development', 0.011970573135622917),\n",
       "  ('asymmetric', 0.011903812041860938),\n",
       "  ('propose', 0.01162387063519353),\n",
       "  ('guide', 0.011476561898011512),\n",
       "  ('redundancy', 0.011470457804131149),\n",
       "  ('linear', 0.011344382839523109),\n",
       "  ('uncertainty', 0.011328169729222539),\n",
       "  ('inverse', 0.011254757148757667),\n",
       "  ('redundant', 0.011057088824934011),\n",
       "  ('consist', 0.011003187452810613),\n",
       "  ('perform', 0.010743419605159654),\n",
       "  ('lead', 0.010690069654871003),\n",
       "  ('degreesoffreedom', 0.010527377213058785),\n",
       "  ('theory', 0.010508734835649335),\n",
       "  ('model', 0.010501985017430354),\n",
       "  ('heterogeneous', 0.010435884105180586),\n",
       "  ('develop', 0.01016588056787387),\n",
       "  ('rpm', 0.01007182397855429),\n",
       "  ('performance', 0.010069939590057699),\n",
       "  ('capability', 0.009968462443629564),\n",
       "  ('operation', 0.009700923178022267),\n",
       "  ('original', 0.009678721909835467),\n",
       "  ('screw', 0.00961801497342797),\n",
       "  ('connect', 0.00958046558559651),\n",
       "  ('achieve', 0.009177349112281252),\n",
       "  ('isomorphic', 0.009171284061514313),\n",
       "  ('representation', 0.009051419730569249),\n",
       "  ('result', 0.008813200481577502),\n",
       "  ('carry', 0.008802479867089812),\n",
       "  ('prrrp', 0.008762980278082281),\n",
       "  ('shape', 0.00842436062337886),\n",
       "  ('type', 0.008407358945426489),\n",
       "  ('computation', 0.008386008146346338),\n",
       "  ('initial', 0.008381170136294058),\n",
       "  ('advantage', 0.008287720944376645),\n",
       "  ('modularity', 0.00808235731787838),\n",
       "  ('study', 0.008055318166869704),\n",
       "  ('reconfigure', 0.008037048335334276)],\n",
       " 13: [('jump', 0.21967422395935832),\n",
       "  ('hop', 0.10732254430106715),\n",
       "  ('jumping', 0.04980965209325843),\n",
       "  ('leg', 0.048090467324858645),\n",
       "  ('takeoff', 0.047734249922706),\n",
       "  ('model', 0.03901132471777818),\n",
       "  ('robot', 0.03560822915365245),\n",
       "  ('mechanism', 0.03201771078123803),\n",
       "  ('energy', 0.031166463565464826),\n",
       "  ('land', 0.02615931193492719),\n",
       "  ('onelegged', 0.02582243491389929),\n",
       "  ('locust', 0.02582243491389929),\n",
       "  ('simulation', 0.02559948200632043),\n",
       "  ('design', 0.02482568383773511),\n",
       "  ('body', 0.02392822160553322),\n",
       "  ('control', 0.023905747628641786),\n",
       "  ('motion', 0.023402923232646564),\n",
       "  ('actuator', 0.02313753798718461),\n",
       "  ('height', 0.02299665044016892),\n",
       "  ('bioinspired', 0.02209144393310811),\n",
       "  ('momentum', 0.020084692254833846),\n",
       "  ('joint', 0.019831814112358674),\n",
       "  ('singlelegged', 0.01952206751791661),\n",
       "  ('frog', 0.019310584261950214),\n",
       "  ('spring', 0.019102050285557653),\n",
       "  ('elastic', 0.01851528201590749),\n",
       "  ('mckibben', 0.018218004866932536),\n",
       "  ('dynamic', 0.017217853336066416),\n",
       "  ('result', 0.01707330428598948),\n",
       "  ('stable', 0.016185936803081186),\n",
       "  ('vertical', 0.0160846067289479),\n",
       "  ('mass', 0.01565263305513219),\n",
       "  ('wheel', 0.015650985699029302),\n",
       "  ('flight', 0.015507664139128399),\n",
       "  ('posture', 0.015500143752508706),\n",
       "  ('paper', 0.015388366825567684),\n",
       "  ('steer', 0.015297066844629392),\n",
       "  ('performance', 0.01518975469000472),\n",
       "  ('selfrighting', 0.015144390549135653),\n",
       "  ('hamiltonian', 0.015019343314850166),\n",
       "  ('hopping', 0.014874946742062745),\n",
       "  ('system', 0.014682275147370714),\n",
       "  ('force', 0.014366745450362216),\n",
       "  ('drive', 0.013843562187887837),\n",
       "  ('prototype', 0.013508244172891136),\n",
       "  ('angle', 0.013372082015762945),\n",
       "  ('aerial', 0.013194187412558511),\n",
       "  ('phase', 0.013109589745584897),\n",
       "  ('adjust', 0.012902723375732913),\n",
       "  ('portcontrolled', 0.012885903449719193),\n",
       "  ('pole', 0.012812249060811753),\n",
       "  ('mechanical', 0.012801710506305249),\n",
       "  ('parameter', 0.012656970431761599),\n",
       "  ('gecko', 0.012620325457613045),\n",
       "  ('hip', 0.01254828278550401),\n",
       "  ('inspire', 0.012175153618460732),\n",
       "  ('knee', 0.012083272314073929),\n",
       "  ('storage', 0.011918661826963654),\n",
       "  ('ground', 0.011811963945083298),\n",
       "  ('legged', 0.011789929750358759),\n",
       "  ('achieve', 0.01173675187134075),\n",
       "  ('experiment', 0.011400440649363276),\n",
       "  ('analysis', 0.011210666381312412),\n",
       "  ('muscle', 0.011139948113868906),\n",
       "  ('tail', 0.010929046990503725),\n",
       "  ('structure', 0.010839090231072572),\n",
       "  ('ability', 0.010719212988215616),\n",
       "  ('pneumatic', 0.01060283006029788),\n",
       "  ('catapult', 0.010568763234683426),\n",
       "  ('crossdomain', 0.010568763234683426),\n",
       "  ('stability', 0.01050543179692293),\n",
       "  ('single', 0.010419702216188743),\n",
       "  ('center', 0.010284252499589162),\n",
       "  ('efficiency', 0.010203724382583922),\n",
       "  ('base', 0.010154046908826398),\n",
       "  ('sea', 0.010094401290727471),\n",
       "  ('propose', 0.010062844418480038),\n",
       "  ('balance', 0.009966931647359902),\n",
       "  ('method', 0.00989786638611244),\n",
       "  ('provide', 0.009894315602964747),\n",
       "  ('load', 0.009878618487285067),\n",
       "  ('analyze', 0.009839190892602517),\n",
       "  ('hybrid', 0.009719689331131473),\n",
       "  ('establish', 0.00952897944636392),\n",
       "  ('develop', 0.009455249109444671),\n",
       "  ('toe', 0.009448445068633082),\n",
       "  ('continuous', 0.009447710801968564),\n",
       "  ('cylinder', 0.009444838857752698),\n",
       "  ('simplify', 0.009036923284008014),\n",
       "  ('pea', 0.009028624745879307),\n",
       "  ('bionic', 0.008989373288746385),\n",
       "  ('realize', 0.008842864672223354),\n",
       "  ('maneuver', 0.008727818551885263),\n",
       "  ('passive', 0.008664302811917749),\n",
       "  ('improve', 0.00852783957481422),\n",
       "  ('length', 0.008525398165243142),\n",
       "  ('foot', 0.008522022287320255),\n",
       "  ('store', 0.008454603564899436),\n",
       "  ('study', 0.00845276393500974),\n",
       "  ('quadruped', 0.00843337615511132)],\n",
       " 14: [('storage', 0.1535074918026625),\n",
       "  ('warehouse', 0.09564791097354058),\n",
       "  ('assignment', 0.08208073435662504),\n",
       "  ('pack', 0.05416956002058038),\n",
       "  ('fulfillment', 0.05288921092064351),\n",
       "  ('pick', 0.05194337827961358),\n",
       "  ('system', 0.047496223952442),\n",
       "  ('rack', 0.03786782840565907),\n",
       "  ('mobile', 0.037598842054484015),\n",
       "  ('throughput', 0.03728439109293371),\n",
       "  ('pod', 0.035980293074482306),\n",
       "  ('rmfs', 0.03275785441331876),\n",
       "  ('bin', 0.03164449336592943),\n",
       "  ('robotic', 0.029638626625423766),\n",
       "  ('item', 0.028227405773436298),\n",
       "  ('schedule', 0.027442905586759162),\n",
       "  ('time', 0.023260863592601558),\n",
       "  ('retrieval', 0.023060191908188005),\n",
       "  ('automate', 0.022275590648056103),\n",
       "  ('queue', 0.021947289138187272),\n",
       "  ('zone', 0.02189417619925646),\n",
       "  ('algorithm', 0.021295072387851374),\n",
       "  ('policy', 0.021253666865200718),\n",
       "  ('picker', 0.020828824156069858),\n",
       "  ('optimization', 0.02060593312045742),\n",
       "  ('station', 0.020586039380194952),\n",
       "  ('waste', 0.02027614336112625),\n",
       "  ('logistics', 0.01987243224441846),\n",
       "  ('robot', 0.019689968114723844),\n",
       "  ('strategy', 0.019225012631533138),\n",
       "  ('kiva', 0.019022448660242487),\n",
       "  ('ecommerce', 0.01872397596815828),\n",
       "  ('path', 0.018711270109851838),\n",
       "  ('product', 0.01823277571705066),\n",
       "  ('dedicate', 0.017355331915560913),\n",
       "  ('box', 0.017187598984083285),\n",
       "  ('job', 0.016496366262274402),\n",
       "  ('packaging', 0.016177629391692233),\n",
       "  ('location', 0.01594895792503406),\n",
       "  ('efficiency', 0.015658529196243765),\n",
       "  ('lift', 0.015552870903939163),\n",
       "  ('solve', 0.01554253617381465),\n",
       "  ('cost', 0.015345849750527761),\n",
       "  ('rule', 0.015339939876131088),\n",
       "  ('vertical', 0.014425287670036953),\n",
       "  ('reduce', 0.014185519676851804),\n",
       "  ('mixingdegree', 0.014124695189855084),\n",
       "  ('isap', 0.014124695189855084),\n",
       "  ('partstopicker', 0.014124695189855084),\n",
       "  ('tray', 0.013833585745936752),\n",
       "  ('transport', 0.01357171390104729),\n",
       "  ('decision', 0.013442896821624464),\n",
       "  ('model', 0.013408328031771794),\n",
       "  ('fsms', 0.013374268548684487),\n",
       "  ('convey', 0.013334949618656174),\n",
       "  ('bag', 0.012865857063456691),\n",
       "  ('allocation', 0.012601691769426607),\n",
       "  ('design', 0.012559528329278957),\n",
       "  ('expenditure', 0.01237074422223642),\n",
       "  ('heuristic', 0.012317573079167407),\n",
       "  ('performance', 0.01230654253584263),\n",
       "  ('paper', 0.01226744286062502),\n",
       "  ('compare', 0.012175047420072553),\n",
       "  ('distance', 0.011967518841520107),\n",
       "  ('shop', 0.011713682059714728),\n",
       "  ('result', 0.011696658477626137),\n",
       "  ('agvs', 0.011620593588624243),\n",
       "  ('transfusion', 0.011584795727062764),\n",
       "  ('aga', 0.011584795727062764),\n",
       "  ('frmfs', 0.011584795727062764),\n",
       "  ('study', 0.011581717432510949),\n",
       "  ('fleet', 0.011555449565494452),\n",
       "  ('random', 0.011368811465040676),\n",
       "  ('outperform', 0.011332333296175591),\n",
       "  ('task', 0.011183940404306316),\n",
       "  ('propose', 0.011030240192980994),\n",
       "  ('threedimensional', 0.011026480298248282),\n",
       "  ('short', 0.010923242843881234),\n",
       "  ('container', 0.010653554597157456),\n",
       "  ('stack', 0.01048190541281273),\n",
       "  ('inventory', 0.010414412078034929),\n",
       "  ('sort', 0.010310987581030152),\n",
       "  ('solution', 0.010279889330347833),\n",
       "  ('vehicle', 0.010152359702178152),\n",
       "  ('replenishment', 0.010079339819482695),\n",
       "  ('workload', 0.010056113214375946),\n",
       "  ('simulation', 0.009977066297108254),\n",
       "  ('feed', 0.009680710747891199),\n",
       "  ('agricultural', 0.009566871053998793),\n",
       "  ('constraint', 0.009542717785232356),\n",
       "  ('planning', 0.009410658087986684),\n",
       "  ('iiot', 0.009407562395686594),\n",
       "  ('capacity', 0.009341290479106711),\n",
       "  ('travel', 0.009285154535995798),\n",
       "  ('lead', 0.009221934889111012),\n",
       "  ('collection', 0.009164647923485779),\n",
       "  ('transportation', 0.009122573416356859),\n",
       "  ('agv', 0.009054893303662754),\n",
       "  ('fishbone', 0.008964214726735455),\n",
       "  ('parcel', 0.008964214726735455)],\n",
       " 15: [('climb', 0.20152112473009917),\n",
       "  ('wall', 0.11475464494309616),\n",
       "  ('stair', 0.07447355842827993),\n",
       "  ('wallclimbing', 0.04965415015487207),\n",
       "  ('stairclimbing', 0.04356017421757011),\n",
       "  ('robot', 0.04355616917456932),\n",
       "  ('surface', 0.04182387668097382),\n",
       "  ('adhesion', 0.03539530856221554),\n",
       "  ('model', 0.027098059464286003),\n",
       "  ('motion', 0.024729733494556854),\n",
       "  ('transition', 0.023823312887867487),\n",
       "  ('dynamic', 0.02067787231079965),\n",
       "  ('adsorption', 0.02035898198497619),\n",
       "  ('cityclimber', 0.020320466310207858),\n",
       "  ('paper', 0.019656787920479497),\n",
       "  ('design', 0.019006767155195354),\n",
       "  ('vertical', 0.018833971441060793),\n",
       "  ('claw', 0.018665530063254318),\n",
       "  ('simulation', 0.01865125912945425),\n",
       "  ('mechanism', 0.01834643624808761),\n",
       "  ('propose', 0.018209937494240235),\n",
       "  ('locomotion', 0.018013619525624136),\n",
       "  ('obstacle', 0.01775307398759628),\n",
       "  ('surfacetransfer', 0.017733042771966415),\n",
       "  ('ceiling', 0.01684643974547193),\n",
       "  ('equation', 0.01584058756931353),\n",
       "  ('result', 0.015618490998570211),\n",
       "  ('humanoid', 0.015546637318790994),\n",
       "  ('posture', 0.01512467114710846),\n",
       "  ('explorerbot', 0.015088509259446013),\n",
       "  ('motherbot', 0.015088509259446013),\n",
       "  ('gunryu', 0.015088509259446013),\n",
       "  ('mobile', 0.015061665106523727),\n",
       "  ('control', 0.014622681908535374),\n",
       "  ('rough', 0.013684850295681434),\n",
       "  ('analyze', 0.013615748297644427),\n",
       "  ('electrostatic', 0.013595389174642631),\n",
       "  ('stability', 0.01353125422031506),\n",
       "  ('base', 0.013511014310618543),\n",
       "  ('underactuated', 0.013274675581693615),\n",
       "  ('mode', 0.012927148202943734),\n",
       "  ('grasp', 0.012897199332160809),\n",
       "  ('force', 0.01286424458653663),\n",
       "  ('wheel', 0.012599283779208338),\n",
       "  ('floor', 0.012551289290651142),\n",
       "  ('hybrid', 0.012519198622616013),\n",
       "  ('analysis', 0.01243603092840517),\n",
       "  ('environment', 0.012376129744897178),\n",
       "  ('paddleaided', 0.012375296970806386),\n",
       "  ('constraint', 0.012232650720803482),\n",
       "  ('structure', 0.01178527196348233),\n",
       "  ('carry', 0.011588194239415888),\n",
       "  ('cpr', 0.011542904977242231),\n",
       "  ('truss', 0.01150083090930367),\n",
       "  ('wheelbased', 0.011125050909698862),\n",
       "  ('adhere', 0.010995018346143404),\n",
       "  ('technique', 0.010969455173190146),\n",
       "  ('hook', 0.010876311339714107),\n",
       "  ('tall', 0.010876311339714107),\n",
       "  ('iii', 0.010852203192388868),\n",
       "  ('terrain', 0.010812881867411242),\n",
       "  ('strategy', 0.010808869713826833),\n",
       "  ('capability', 0.010498539576056325),\n",
       "  ('hip', 0.010495127581968553),\n",
       "  ('hold', 0.010449732296565655),\n",
       "  ('path', 0.010428549991357058),\n",
       "  ('milp', 0.010401166178907177),\n",
       "  ('static', 0.010334429668170445),\n",
       "  ('paddle', 0.01024945275707532),\n",
       "  ('size', 0.010112772290895099),\n",
       "  ('establish', 0.01004200331420296),\n",
       "  ('module', 0.010025451812761254),\n",
       "  ('dot', 0.009988872755440515),\n",
       "  ('perform', 0.009900367230820956),\n",
       "  ('contact', 0.009859462865763861),\n",
       "  ('modeling', 0.009846398414665569),\n",
       "  ('kinect', 0.009769324918845317),\n",
       "  ('inspection', 0.009579689003404586),\n",
       "  ('msrox', 0.009575897751418871),\n",
       "  ('platewheel', 0.009575897751418871),\n",
       "  ('fwt', 0.009575897751418871),\n",
       "  ('crossarranged', 0.009575897751418871),\n",
       "  ('confinedspace', 0.009575897751418871),\n",
       "  ('structural', 0.009532156757639368),\n",
       "  ('basic', 0.009458607738956465),\n",
       "  ('cross', 0.009447524031748896),\n",
       "  ('effectiveness', 0.009368994888802247),\n",
       "  ('incline', 0.009340601913694792),\n",
       "  ('lshaped', 0.009281472728104789),\n",
       "  ('child', 0.00926883645288268),\n",
       "  ('node', 0.00920793751880038),\n",
       "  ('move', 0.009155546581431681),\n",
       "  ('study', 0.009072806325329457),\n",
       "  ('planning', 0.008935826369001497),\n",
       "  ('integer', 0.008930187988660118),\n",
       "  ('weld', 0.00892622516818041),\n",
       "  ('experiment', 0.008899422792815822),\n",
       "  ('fly', 0.008874449292577509),\n",
       "  ('adhesive', 0.008866521385983208),\n",
       "  ('system', 0.00880562643583978)],\n",
       " 16: [('spray', 0.2329565901262347),\n",
       "  ('spraypainting', 0.06028171518505725),\n",
       "  ('system', 0.035452322916821974),\n",
       "  ('robot', 0.03409805872079666),\n",
       "  ('analysis', 0.031453408106273284),\n",
       "  ('hybrid', 0.027140363286159416),\n",
       "  ('pyrolysis', 0.02477800877274031),\n",
       "  ('spraying', 0.0241179912842658),\n",
       "  ('paint', 0.022216513868824648),\n",
       "  ('method', 0.021984683992230514),\n",
       "  ('trajectory', 0.021923962586932702),\n",
       "  ('coconut', 0.02085658204584174),\n",
       "  ('base', 0.02050336395051484),\n",
       "  ('control', 0.02037889507952529),\n",
       "  ('similitude', 0.020053964579789616),\n",
       "  ('model', 0.019721826804848092),\n",
       "  ('walk', 0.018528971284573956),\n",
       "  ('electromechanical', 0.01779282249585035),\n",
       "  ('algorithm', 0.017703083808395487),\n",
       "  ('structure', 0.01768796592653052),\n",
       "  ('surface', 0.017333962464922834),\n",
       "  ('monitoring', 0.01731502203320282),\n",
       "  ('characteristic', 0.017012921029284485),\n",
       "  ('operation', 0.016957780559066847),\n",
       "  ('accord', 0.01675478748342915),\n",
       "  ('digital', 0.016563143357541422),\n",
       "  ('plan', 0.016441992792171324),\n",
       "  ('design', 0.016360713239217443),\n",
       "  ('camouflage', 0.01635518514772051),\n",
       "  ('dynamic', 0.016249985840843747),\n",
       "  ('traceability', 0.015733116746412517),\n",
       "  ('path', 0.015072031570348884),\n",
       "  ('paper', 0.01479650656304585),\n",
       "  ('stability', 0.014667199008780859),\n",
       "  ('intelligent', 0.014482617568117091),\n",
       "  ('motor', 0.014205919633727885),\n",
       "  ('complex', 0.014105827857789272),\n",
       "  ('curve', 0.014074423445579996),\n",
       "  ('automatic', 0.013936740312446839),\n",
       "  ('mechanism', 0.01383416636046946),\n",
       "  ('wall', 0.013604966313202108),\n",
       "  ('result', 0.013543726957635885),\n",
       "  ('pid', 0.013427717468985604),\n",
       "  ('multioperation', 0.013414199490175117),\n",
       "  ('planning', 0.013318231229797393),\n",
       "  ('drive', 0.013178006313470153),\n",
       "  ('propose', 0.012772071761916973),\n",
       "  ('couple', 0.012755390593488944),\n",
       "  ('parameter', 0.012682591829396744),\n",
       "  ('deposition', 0.012655928351072222),\n",
       "  ('admittance', 0.012606669011889749),\n",
       "  ('carry', 0.012561019717355017),\n",
       "  ('element', 0.012494978617372716),\n",
       "  ('technology', 0.012410172280543731),\n",
       "  ('mechanical', 0.012186243655040573),\n",
       "  ('improve', 0.01180777787281969),\n",
       "  ('simulation', 0.011552586751570245),\n",
       "  ('robotic', 0.011439662224383852),\n",
       "  ('prototype', 0.011430052761677115),\n",
       "  ('realize', 0.011223635930129641),\n",
       "  ('kinematics', 0.011070494861387118),\n",
       "  ('painting', 0.010961924069722498),\n",
       "  ('establish', 0.010885026521423402),\n",
       "  ('instruction', 0.010730842986218514),\n",
       "  ('process', 0.010594821188797258),\n",
       "  ('chaos', 0.010434681930257443),\n",
       "  ('paintspraying', 0.01037979153454464),\n",
       "  ('mortar', 0.01037979153454464),\n",
       "  ('production', 0.01018873336080723),\n",
       "  ('tree', 0.010098415394920294),\n",
       "  ('foliage', 0.010060649617631338),\n",
       "  ('requirement', 0.010052926030776852),\n",
       "  ('speed', 0.010025127995894573),\n",
       "  ('nurbs', 0.009973057809221616),\n",
       "  ('pressure', 0.009954892577918935),\n",
       "  ('net', 0.009920701927781833),\n",
       "  ('error', 0.009885535254360816),\n",
       "  ('chemical', 0.009868721728905324),\n",
       "  ('study', 0.00983446573207864),\n",
       "  ('static', 0.009801751733628562),\n",
       "  ('calculate', 0.00978921191994401),\n",
       "  ('pattern', 0.009713977521774468),\n",
       "  ('compensation', 0.00961419250890058),\n",
       "  ('coating', 0.00943987004784751),\n",
       "  ('climb', 0.009255879810574425),\n",
       "  ('accuracy', 0.009242369247346172),\n",
       "  ('develop', 0.00923145623111462),\n",
       "  ('finally', 0.009205356320335117),\n",
       "  ('verification', 0.009156591639307357),\n",
       "  ('workpiece', 0.009134426858217371),\n",
       "  ('threedimensional', 0.00911979866172215),\n",
       "  ('analyze', 0.009082330054710016),\n",
       "  ('largesized', 0.008938535162503602),\n",
       "  ('condition', 0.00889909411634855),\n",
       "  ('optimization', 0.00883700095881988),\n",
       "  ('workbench', 0.008594556248481265),\n",
       "  ('inertia', 0.008586839851109924),\n",
       "  ('grade', 0.008522984828624893),\n",
       "  ('industrial', 0.008451171169768516),\n",
       "  ('load', 0.008358831027702749)],\n",
       " 17: [('selection', 0.14656130817714874),\n",
       "  ('decision', 0.12302372921427442),\n",
       "  ('mcdm', 0.07615554437562749),\n",
       "  ('decisionmaking', 0.061239349815847006),\n",
       "  ('fuzzy', 0.0589447603262979),\n",
       "  ('industrial', 0.05145225811842766),\n",
       "  ('criterion', 0.04498344940182303),\n",
       "  ('multicriteria', 0.040391650228428305),\n",
       "  ('rank', 0.04006911659630679),\n",
       "  ('method', 0.039331091882569814),\n",
       "  ('preference', 0.038910821308652574),\n",
       "  ('maker', 0.035940407055714975),\n",
       "  ('robot', 0.03416122666951988),\n",
       "  ('industry', 0.03329162610798186),\n",
       "  ('ahp', 0.03130883793289105),\n",
       "  ('attribute', 0.030110557029042494),\n",
       "  ('alternative', 0.028416668713045986),\n",
       "  ('hesitant', 0.027534240366969425),\n",
       "  ('membership', 0.027474999164056838),\n",
       "  ('technique', 0.02739843948092876),\n",
       "  ('application', 0.027049919044583395),\n",
       "  ('weight', 0.025124770259224476),\n",
       "  ('entropy', 0.023891919188522365),\n",
       "  ('intuitionistic', 0.02338526341222699),\n",
       "  ('set', 0.022522681371835274),\n",
       "  ('topsis', 0.02206716811975518),\n",
       "  ('todim', 0.02206716811975518),\n",
       "  ('promethee', 0.02206716811975518),\n",
       "  ('digraph', 0.02172092210311359),\n",
       "  ('vikor', 0.02172092210311359),\n",
       "  ('approach', 0.02138689158638557),\n",
       "  ('firm', 0.020462105485698615),\n",
       "  ('function', 0.020416881941791712),\n",
       "  ('logic', 0.020152984475355594),\n",
       "  ('company', 0.02013321386721794),\n",
       "  ('taro', 0.019257335444473344),\n",
       "  ('literature', 0.019015274778294445),\n",
       "  ('subjective', 0.018983114331546227),\n",
       "  ('beverage', 0.018914715531218724),\n",
       "  ('hierarchy', 0.018767009123893435),\n",
       "  ('select', 0.01874972089807353),\n",
       "  ('neuro', 0.018122003084287158),\n",
       "  ('manufacturing', 0.01689645946439351),\n",
       "  ('edas', 0.016385483749327998),\n",
       "  ('specification', 0.015938952356292575),\n",
       "  ('system', 0.01593756396408941),\n",
       "  ('manufacture', 0.015466527063327259),\n",
       "  ('multiple', 0.015213476325578689),\n",
       "  ('propose', 0.015122229329883304),\n",
       "  ('quality', 0.015002927308693082),\n",
       "  ('task', 0.014827467276084508),\n",
       "  ('evaluation', 0.014754626002724668),\n",
       "  ('specific', 0.014711929937352264),\n",
       "  ('purpose', 0.01447867606268479),\n",
       "  ('market', 0.01370690034970367),\n",
       "  ('process', 0.013509298087611877),\n",
       "  ('analysis', 0.013505004316841629),\n",
       "  ('bestworst', 0.013439049804162103),\n",
       "  ('wgao', 0.013439049804162103),\n",
       "  ('mcgdmip', 0.013439049804162103),\n",
       "  ('interval', 0.013273417501279567),\n",
       "  ('objective', 0.013259361730130575),\n",
       "  ('qfd', 0.013108386999462398),\n",
       "  ('effective', 0.013058502450451929),\n",
       "  ('paper', 0.013045047534975495),\n",
       "  ('organization', 0.012679373938977136),\n",
       "  ('rsp', 0.012609810354145816),\n",
       "  ('aggregation', 0.012489416596950374),\n",
       "  ('choose', 0.012456667738613007),\n",
       "  ('beneficial', 0.012444828307874158),\n",
       "  ('management', 0.012344099232590673),\n",
       "  ('result', 0.012211935503557871),\n",
       "  ('productivity', 0.011833867792750715),\n",
       "  ('base', 0.011737912691937148),\n",
       "  ('requirement', 0.01151034223774757),\n",
       "  ('manufacturer', 0.011473773068429071),\n",
       "  ('suit', 0.011447916318357015),\n",
       "  ('final', 0.011263888273247294),\n",
       "  ('model', 0.01093015783377642),\n",
       "  ('truck', 0.010913330070727945),\n",
       "  ('manager', 0.010913330070727945),\n",
       "  ('technical', 0.010840841678126824),\n",
       "  ('version', 0.010681673417224005),\n",
       "  ('challenge', 0.010623020798910645),\n",
       "  ('dimension', 0.010557558956814777),\n",
       "  ('inerativa', 0.010399020492556024),\n",
       "  ('pakistan', 0.010399020492556024),\n",
       "  ('copra', 0.010399020492556024),\n",
       "  ('nonbeneficial', 0.010399020492556024),\n",
       "  ('tomada', 0.010399020492556024),\n",
       "  ('multicritero', 0.010399020492556024),\n",
       "  ('table', 0.01012962954248591),\n",
       "  ('aforesaid', 0.010079287353121576),\n",
       "  ('methodology', 0.01006806743575857),\n",
       "  ('customer', 0.010065564891959663),\n",
       "  ('hybrid', 0.009887506123584501),\n",
       "  ('study', 0.0098526844533311),\n",
       "  ('confusion', 0.0098312902495968),\n",
       "  ('apply', 0.009774766485759609),\n",
       "  ('load', 0.009770035426229323)],\n",
       " 18: [('polish', 0.3709585117227751),\n",
       "  ('surface', 0.13808160738015124),\n",
       "  ('tool', 0.08522775098775269),\n",
       "  ('removal', 0.05029834003621174),\n",
       "  ('aspheric', 0.04521768586766248),\n",
       "  ('freeform', 0.04277166700773541),\n",
       "  ('communication', 0.04132089224796791),\n",
       "  ('roughness', 0.03931232366499482),\n",
       "  ('ballonet', 0.038543172832538254),\n",
       "  ('mcf', 0.03513707553212789),\n",
       "  ('polishing', 0.03428340294951736),\n",
       "  ('system', 0.033122359377607664),\n",
       "  ('curve', 0.029989945623993937),\n",
       "  ('bonnet', 0.02984247089815633),\n",
       "  ('process', 0.029553471561065418),\n",
       "  ('mould', 0.029057400758520674),\n",
       "  ('robot', 0.028116791682775116),\n",
       "  ('doublerobot', 0.02771856678785039),\n",
       "  ('parameter', 0.027024214583679113),\n",
       "  ('control', 0.026054152385359988),\n",
       "  ('multiagent', 0.024654425034752694),\n",
       "  ('offaxis', 0.024574727359164807),\n",
       "  ('agent', 0.02451619702928287),\n",
       "  ('curvature', 0.023384881503040092),\n",
       "  ('efficiency', 0.02152479276848058),\n",
       "  ('workpiece', 0.021020842744357254),\n",
       "  ('experiment', 0.02096603023629475),\n",
       "  ('rabpss', 0.020909891555289013),\n",
       "  ('mlike', 0.020909891555289013),\n",
       "  ('material', 0.02055277431066035),\n",
       "  ('sic', 0.02047893946597067),\n",
       "  ('program', 0.019815240773522286),\n",
       "  ('multirobot', 0.019694443327696005),\n",
       "  ('stiffness', 0.01930825575823263),\n",
       "  ('cs', 0.018651544311347707),\n",
       "  ('lambda', 0.01714987963188346),\n",
       "  ('rabps', 0.01714987963188346),\n",
       "  ('abrasive', 0.016727913244231212),\n",
       "  ('industrial', 0.01662263454668417),\n",
       "  ('mold', 0.016450641156821308),\n",
       "  ('mode', 0.01642175670650547),\n",
       "  ('optimization', 0.015817187153526497),\n",
       "  ('robotassisted', 0.01542274564319331),\n",
       "  ('paper', 0.015133713001031102),\n",
       "  ('improve', 0.01509609048137326),\n",
       "  ('processing', 0.01495202499460003),\n",
       "  ('optical', 0.01442583533821372),\n",
       "  ('characteristic', 0.013982656067837461),\n",
       "  ('design', 0.013944639432259723),\n",
       "  ('structure', 0.013819565498259093),\n",
       "  ('force', 0.013713439128255633),\n",
       "  ('constant', 0.013454241476871357),\n",
       "  ('method', 0.013384348872000747),\n",
       "  ('hsic', 0.013270428515086861),\n",
       "  ('nsc', 0.013270428515086861),\n",
       "  ('slurry', 0.013270428515086861),\n",
       "  ('nnw', 0.013270428515086861),\n",
       "  ('npt800', 0.013270428515086861),\n",
       "  ('analyze', 0.013063095993582918),\n",
       "  ('function', 0.013027225617233056),\n",
       "  ('rms', 0.012750424735761346),\n",
       "  ('optimal', 0.01254664927119902),\n",
       "  ('alliance', 0.01254593493317341),\n",
       "  ('protocol', 0.012424123239074129),\n",
       "  ('seriesparallel', 0.012413747838304172),\n",
       "  ('coordinate', 0.012362142988438175),\n",
       "  ('introduce', 0.01234627875868178),\n",
       "  ('technology', 0.012340411921519924),\n",
       "  ('optimize', 0.012203480726356084),\n",
       "  ('achieve', 0.011720103996345939),\n",
       "  ('contact', 0.011711483549971176),\n",
       "  ('dynamic', 0.011462287232709934),\n",
       "  ('meet', 0.011258432272219997),\n",
       "  ('converge', 0.011204266283526302),\n",
       "  ('serial', 0.011133268982608415),\n",
       "  ('wheel', 0.011111089847325057),\n",
       "  ('multibody', 0.01104870025525645),\n",
       "  ('requirement', 0.01101645875875202),\n",
       "  ('socket', 0.010896525284445253),\n",
       "  ('coaxial', 0.010896525284445253),\n",
       "  ('model', 0.010729403889202604),\n",
       "  ('performance', 0.01071666935884391),\n",
       "  ('unstructured', 0.010661871571855417),\n",
       "  ('quality', 0.010636433098545476),\n",
       "  ('genetic', 0.010513420354236223),\n",
       "  ('base', 0.010485313687412224),\n",
       "  ('aco', 0.010321724404534044),\n",
       "  ('foundation', 0.010315872752892571),\n",
       "  ('double', 0.010089920146473216),\n",
       "  ('theory', 0.010065281131591792),\n",
       "  ('controller', 0.009803537843413198),\n",
       "  ('analysis', 0.00957446983219216),\n",
       "  ('forceposition', 0.009462774310269503),\n",
       "  ('mutual', 0.00936933941901846),\n",
       "  ('dynamical', 0.009357679380349768),\n",
       "  ('establish', 0.009277576584374744),\n",
       "  ('simulation', 0.009231144969339819),\n",
       "  ('precision', 0.009180382298960016),\n",
       "  ('study', 0.009144172048842688),\n",
       "  ('verify', 0.009120985280175978)],\n",
       " 19: [('rfid', 0.2828295129172781),\n",
       "  ('tag', 0.2039021214514439),\n",
       "  ('localization', 0.08029862383617768),\n",
       "  ('mobile', 0.0639961972455761),\n",
       "  ('navigation', 0.062315673373697714),\n",
       "  ('reader', 0.05787569724472091),\n",
       "  ('system', 0.0375765967025602),\n",
       "  ('landmark', 0.03715419827410629),\n",
       "  ('uhfrfid', 0.03531878530389552),\n",
       "  ('robot', 0.03336109487917691),\n",
       "  ('indoor', 0.03194984507371339),\n",
       "  ('sensor', 0.03059719243509045),\n",
       "  ('location', 0.030373578076688886),\n",
       "  ('position', 0.027241756865625924),\n",
       "  ('signal', 0.026218868267466344),\n",
       "  ('passive', 0.02463248435541222),\n",
       "  ('technique', 0.023728024437358167),\n",
       "  ('map', 0.02330357125423843),\n",
       "  ('propose', 0.023170534749562894),\n",
       "  ('rssi', 0.02295962559309011),\n",
       "  ('radio', 0.02104769794279115),\n",
       "  ('antenna', 0.020572795274838143),\n",
       "  ('localize', 0.02017702593001437),\n",
       "  ('global', 0.018385592528550206),\n",
       "  ('environment', 0.017847201122899694),\n",
       "  ('identification', 0.017455504514418782),\n",
       "  ('method', 0.017160823692105334),\n",
       "  ('navigate', 0.015805354915444023),\n",
       "  ('autonomous', 0.01573766101956731),\n",
       "  ('scatter', 0.015343839125348448),\n",
       "  ('rfidbased', 0.014795443494680396),\n",
       "  ('bpann', 0.014795443494680396),\n",
       "  ('bear', 0.01463570718184951),\n",
       "  ('frequency', 0.014597176799640765),\n",
       "  ('estimation', 0.0145865492288077),\n",
       "  ('tone', 0.01434053588090413),\n",
       "  ('customer', 0.014321011936425479),\n",
       "  ('measurement', 0.014231894172592184),\n",
       "  ('ultrasonic', 0.014174869337275508),\n",
       "  ('radiofrequency', 0.013987692347739462),\n",
       "  ('technology', 0.013758550982611827),\n",
       "  ('paper', 0.013498282761067279),\n",
       "  ('reconstruct', 0.013278098249535514),\n",
       "  ('read', 0.012916464042692224),\n",
       "  ('estimate', 0.012866223257793663),\n",
       "  ('delivery', 0.012861813628493219),\n",
       "  ('learn', 0.012756894004343258),\n",
       "  ('improve', 0.012623180561981197),\n",
       "  ('algorithm', 0.012617063420638215),\n",
       "  ('result', 0.012548473642984097),\n",
       "  ('experiment', 0.012375217388070037),\n",
       "  ('robotic', 0.012229644170295442),\n",
       "  ('mount', 0.012216620851908552),\n",
       "  ('radiation', 0.012148735359305066),\n",
       "  ('topological', 0.012009216931779365),\n",
       "  ('approach', 0.011703341387546055),\n",
       "  ('feature', 0.011213014921371034),\n",
       "  ('hospital', 0.011208831418200348),\n",
       "  ('fusion', 0.011133640535895124),\n",
       "  ('kalman', 0.010988352687991148),\n",
       "  ('trajectory', 0.010817516595344759),\n",
       "  ('costeffective', 0.010740758952319109),\n",
       "  ('incorporate', 0.010572706957852415),\n",
       "  ('provide', 0.010441971448147297),\n",
       "  ('deployment', 0.010366585622417853),\n",
       "  ('randomly', 0.010348331969463416),\n",
       "  ('pedestrian', 0.010141436692597724),\n",
       "  ('demonstrate', 0.010086640308438212),\n",
       "  ('base', 0.010020229738177658),\n",
       "  ('data', 0.009934655963018341),\n",
       "  ('threewheel', 0.009863628996453598),\n",
       "  ('rtmiddleware', 0.009863628996453598),\n",
       "  ('accurately', 0.009798009934089623),\n",
       "  ('rho', 0.009560357253936088),\n",
       "  ('multihypothesis', 0.009560357253936088),\n",
       "  ('phase', 0.009487003058902977),\n",
       "  ('commodity', 0.009325128231826308),\n",
       "  ('oral', 0.009325128231826308),\n",
       "  ('filter', 0.00929258137817301),\n",
       "  ('accuracy', 0.009221906437204445),\n",
       "  ('gradient', 0.009075755186642269),\n",
       "  ('effectiveness', 0.009047352404810024),\n",
       "  ('unknown', 0.008932623142308136),\n",
       "  ('commercial', 0.008877667755019015),\n",
       "  ('analog', 0.00882969632597388),\n",
       "  ('determine', 0.008792296727581236),\n",
       "  ('distribute', 0.008749205397906998),\n",
       "  ('probability', 0.008701796546486127),\n",
       "  ('experimental', 0.008700496419879862),\n",
       "  ('inventory', 0.008594497684851704),\n",
       "  ('strength', 0.008584302972916714),\n",
       "  ('extend', 0.008509975917155852),\n",
       "  ('sense', 0.008480318094068826),\n",
       "  ('strategy', 0.008350236460523576),\n",
       "  ('deploy', 0.008170680102474608),\n",
       "  ('smart', 0.008116324716913554),\n",
       "  ('explanation', 0.008099156906203378),\n",
       "  ('receive', 0.008071193178286458),\n",
       "  ('uncertainty', 0.008064677500956794),\n",
       "  ('virtually', 0.008035270972687648)],\n",
       " 20: [('pipe', 0.16087325198253763),\n",
       "  ('pipeline', 0.10040608638440254),\n",
       "  ('elbow', 0.06378832601721346),\n",
       "  ('inpipe', 0.06261641521907699),\n",
       "  ('robot', 0.038262068834322094),\n",
       "  ('wheel', 0.03786863067491959),\n",
       "  ('noncircular', 0.037378393906788786),\n",
       "  ('twomass', 0.037378393906788786),\n",
       "  ('inspection', 0.03442627325769843),\n",
       "  ('roll', 0.03386357019501263),\n",
       "  ('drive', 0.029126474637586476),\n",
       "  ('movement', 0.02828418512564312),\n",
       "  ('gear', 0.026607090867509918),\n",
       "  ('spherepipe', 0.025490705426500032),\n",
       "  ('pipetting', 0.025490705426500032),\n",
       "  ('mechanism', 0.024079184116383576),\n",
       "  ('speed', 0.023265770317103054),\n",
       "  ('motion', 0.023058313865316957),\n",
       "  ('rotation', 0.022243387792670113),\n",
       "  ('force', 0.021336873778514467),\n",
       "  ('unit', 0.02088196124651771),\n",
       "  ('position', 0.020275669553346688),\n",
       "  ('diameter', 0.019437128858483612),\n",
       "  ('model', 0.018919848790401157),\n",
       "  ('curve', 0.01866465963553129),\n",
       "  ('propose', 0.0184773366860173),\n",
       "  ('axis', 0.018360679070772497),\n",
       "  ('joint', 0.01812082862241553),\n",
       "  ('outpipe', 0.017789110064459792),\n",
       "  ('pas', 0.017401439700993514),\n",
       "  ('stopper', 0.01735141565058804),\n",
       "  ('vshaped', 0.01735141565058804),\n",
       "  ('core', 0.017161769097618074),\n",
       "  ('underactuated', 0.016696696843404114),\n",
       "  ('simulation', 0.016277872357656358),\n",
       "  ('chain', 0.016096743661352747),\n",
       "  ('hooke', 0.015634364167092716),\n",
       "  ('peristaltic', 0.015477397241196823),\n",
       "  ('study', 0.015413132079630314),\n",
       "  ('paper', 0.014912904780442248),\n",
       "  ('cut', 0.014844167057421203),\n",
       "  ('balance', 0.01467910531487091),\n",
       "  ('design', 0.014464400391971216),\n",
       "  ('walk', 0.014041151363690317),\n",
       "  ('output', 0.013860726467858485),\n",
       "  ('angle', 0.01385082747292366),\n",
       "  ('clutch', 0.013837851858467939),\n",
       "  ('clean', 0.013634609041296592),\n",
       "  ('kinematic', 0.012964028469620564),\n",
       "  ('endoscope', 0.012745352713250016),\n",
       "  ('isotropic', 0.012722732113996561),\n",
       "  ('dynamic', 0.01263261823970346),\n",
       "  ('rotate', 0.012597008814373317),\n",
       "  ('fluid', 0.012512682396221858),\n",
       "  ('method', 0.012494903422193927),\n",
       "  ('crawl', 0.012353385178699789),\n",
       "  ('develop', 0.01224220581114955),\n",
       "  ('direction', 0.012092483095538762),\n",
       "  ('internal', 0.011811810011421148),\n",
       "  ('result', 0.011674573075400114),\n",
       "  ('outofplane', 0.011499054567799006),\n",
       "  ('control', 0.011410670956413177),\n",
       "  ('impact', 0.011316347727651103),\n",
       "  ('reservoir', 0.011302673357823301),\n",
       "  ('establish', 0.011227278186338735),\n",
       "  ('junction', 0.011213518172036635),\n",
       "  ('standard', 0.011115110572785832),\n",
       "  ('constrain', 0.011108684650947259),\n",
       "  ('ultrasonic', 0.010989752792550123),\n",
       "  ('straight', 0.010951937008574848),\n",
       "  ('integrity', 0.010902786666698003),\n",
       "  ('system', 0.010849558361989656),\n",
       "  ('roi', 0.010834383715385506),\n",
       "  ('pattern', 0.010735080602778389),\n",
       "  ('inertial', 0.01067543315130487),\n",
       "  ('instal', 0.010661441122803126),\n",
       "  ('thickness', 0.0106464284226277),\n",
       "  ('double', 0.01046600348690086),\n",
       "  ('structure', 0.010425210585872927),\n",
       "  ('size', 0.010383428706163222),\n",
       "  ('sensor', 0.010351397574455676),\n",
       "  ('laboratory', 0.010299074725015808),\n",
       "  ('flc', 0.01028351750966618),\n",
       "  ('motor', 0.010275841104712705),\n",
       "  ('move', 0.010236191445220087),\n",
       "  ('scheme', 0.01022650564792808),\n",
       "  ('mobile', 0.009923229211611727),\n",
       "  ('navigation', 0.009898322069992846),\n",
       "  ('iso', 0.009883842551138505),\n",
       "  ('defect', 0.009687630705305286),\n",
       "  ('characteristic', 0.00966922268545896),\n",
       "  ('biomimetic', 0.009657335707949972),\n",
       "  ('intersecting', 0.009574387823187439),\n",
       "  ('intersection', 0.009487634608605473),\n",
       "  ('liquid', 0.00940962065588701),\n",
       "  ('coulomb', 0.009384511797166394),\n",
       "  ('conduct', 0.00936027571075916),\n",
       "  ('lab', 0.009335548288601708),\n",
       "  ('multilink', 0.009335548288601708),\n",
       "  ('realize', 0.009302572203001028)],\n",
       " 21: [('dual', 0.20982023613610268),\n",
       "  ('arm', 0.18159134803537477),\n",
       "  ('dualarm', 0.1483760010139947),\n",
       "  ('provision', 0.07508014805757651),\n",
       "  ('industrial', 0.0625204920946316),\n",
       "  ('robot', 0.061370864992930964),\n",
       "  ('assembly', 0.05745577408479583),\n",
       "  ('market', 0.05609927825783737),\n",
       "  ('iso', 0.050007828689259085),\n",
       "  ('evaluation', 0.03952628841821725),\n",
       "  ('develop', 0.03922872583372578),\n",
       "  ('payload', 0.03448196753529541),\n",
       "  ('human', 0.03444031260442304),\n",
       "  ('worker', 0.03392826266452302),\n",
       "  ('manipulator', 0.03336430925039178),\n",
       "  ('introduce', 0.032397493268749335),\n",
       "  ('precision', 0.03211994799387995),\n",
       "  ('special', 0.03149053122053239),\n",
       "  ('emerge', 0.030951010245060404),\n",
       "  ('elbow', 0.030737184626987653),\n",
       "  ('repeatability', 0.029442306614592517),\n",
       "  ('bolt', 0.02903674096066642),\n",
       "  ('torso', 0.028655074631742498),\n",
       "  ('standalone', 0.0266554166853154),\n",
       "  ('shaft', 0.026107765413159945),\n",
       "  ('time', 0.025817002448931398),\n",
       "  ('hollow', 0.025629644439915455),\n",
       "  ('worm', 0.025215730413876702),\n",
       "  ('rescue', 0.02521348218185768),\n",
       "  ('gear', 0.024476362859847833),\n",
       "  ('design', 0.024394468485714898),\n",
       "  ('performance', 0.024371780316080505),\n",
       "  ('automobile', 0.02344985188897277),\n",
       "  ('duplex', 0.02321501762564823),\n",
       "  ('maker', 0.022924059705393997),\n",
       "  ('study', 0.021995364217982333),\n",
       "  ('perform', 0.021601471230920266),\n",
       "  ('manufacture', 0.020716702999464157),\n",
       "  ('structure', 0.019780090928593265),\n",
       "  ('control', 0.01924429948728409),\n",
       "  ('mechanical', 0.018170169750884868),\n",
       "  ('motoman', 0.01816215015272714),\n",
       "  ('selfcollision', 0.018056614653093054),\n",
       "  ('succeed', 0.01785814047435705),\n",
       "  ('specification', 0.017791245826978355),\n",
       "  ('relate', 0.015756217869806646),\n",
       "  ('competition', 0.01566465924789597),\n",
       "  ('redundant', 0.015438997578653208),\n",
       "  ('position', 0.015387874771441898),\n",
       "  ('method', 0.015219299927033109),\n",
       "  ('narrow', 0.015073088906920055),\n",
       "  ('field', 0.01505901711089869),\n",
       "  ('battle', 0.015000825236324861),\n",
       "  ('servo', 0.014635594492903544),\n",
       "  ('cooperative', 0.01439622878357255),\n",
       "  ('twoarm', 0.014330176003483198),\n",
       "  ('backlash', 0.014262636388213974),\n",
       "  ('job', 0.014240452927262517),\n",
       "  ('application', 0.013935432620983124),\n",
       "  ('manufacturing', 0.013716382914323809),\n",
       "  ('movement', 0.01325049477786654),\n",
       "  ('lightweight', 0.01322367054629914),\n",
       "  ('co', 0.01305145284317631),\n",
       "  ('waist', 0.012708106411139624),\n",
       "  ('distance', 0.012397122081984931),\n",
       "  ('consist', 0.012290988134839316),\n",
       "  ('test', 0.01227222779918278),\n",
       "  ('singlearm', 0.012258495733883224),\n",
       "  ('collide', 0.012181587204671102),\n",
       "  ('dof', 0.012109925530991217),\n",
       "  ('humanrobot', 0.012095880972158784),\n",
       "  ('packaging', 0.011970260575537843),\n",
       "  ('cooperation', 0.01193516383872197),\n",
       "  ('establishment', 0.0119054269829047),\n",
       "  ('developed', 0.011782928452168662),\n",
       "  ('footprint', 0.011782928452168662),\n",
       "  ('analysis', 0.011724567896245238),\n",
       "  ('endeffectors', 0.011668891620933056),\n",
       "  ('adjustable', 0.011562223436564288),\n",
       "  ('urban', 0.01127822432031427),\n",
       "  ('real', 0.011006781194356352),\n",
       "  ('substitute', 0.010927021158656765),\n",
       "  ('unexpected', 0.010892240974975173),\n",
       "  ('characteristic', 0.010871544006424495),\n",
       "  ('hazard', 0.01085817894045216),\n",
       "  ('implement', 0.010737487372051782),\n",
       "  ('algorithms', 0.010697682953330378),\n",
       "  ('item', 0.010443106165263978),\n",
       "  ('task', 0.010344120703616648),\n",
       "  ('accuracy', 0.010335552706709697),\n",
       "  ('utilization', 0.01022263892249647),\n",
       "  ('current', 0.010093959615481853),\n",
       "  ('power', 0.009949027998591863),\n",
       "  ('single', 0.009859503172307629),\n",
       "  ('joint', 0.009650873595691594),\n",
       "  ('search', 0.009531625742180118),\n",
       "  ('controller', 0.009527838681563695),\n",
       "  ('kinematics', 0.009523006332376014),\n",
       "  ('humanoid', 0.009422496687629529),\n",
       "  ('aim', 0.009326931959539668)],\n",
       " 22: [('sound', 0.2039720117032136),\n",
       "  ('source', 0.12320393558339657),\n",
       "  ('auditory', 0.10266360196270272),\n",
       "  ('array', 0.09804732945667707),\n",
       "  ('microphone', 0.09601593295673111),\n",
       "  ('localization', 0.08150741416396519),\n",
       "  ('acoustic', 0.06962408570438669),\n",
       "  ('audition', 0.06219820628750821),\n",
       "  ('signal', 0.05568375399921667),\n",
       "  ('audio', 0.05265753196782991),\n",
       "  ('arrival', 0.04980710286665755),\n",
       "  ('tfs', 0.04506665539748361),\n",
       "  ('speaker', 0.04306029666058261),\n",
       "  ('sensor', 0.03839872587201053),\n",
       "  ('tdoa', 0.036697755812253895),\n",
       "  ('recognition', 0.03323586932808409),\n",
       "  ('direction', 0.0323969526393214),\n",
       "  ('system', 0.03204826927107901),\n",
       "  ('doa', 0.031519435030099185),\n",
       "  ('robot', 0.029114655354082287),\n",
       "  ('field', 0.028706194291327435),\n",
       "  ('unit', 0.028402759781573424),\n",
       "  ('position', 0.02632455714386755),\n",
       "  ('aural', 0.02579887670242538),\n",
       "  ('humanoid', 0.025330459561104732),\n",
       "  ('crosscorrelation', 0.025037030776379785),\n",
       "  ('network', 0.02404758917337438),\n",
       "  ('environment', 0.023464361452059754),\n",
       "  ('target', 0.02110182331398671),\n",
       "  ('function', 0.020421696919677046),\n",
       "  ('framework', 0.020148110338950014),\n",
       "  ('localize', 0.01989559985579343),\n",
       "  ('method', 0.01888337638005442),\n",
       "  ('base', 0.017290820933889946),\n",
       "  ('asl', 0.017020592061497097),\n",
       "  ('roomacoustics', 0.017020592061497097),\n",
       "  ('robotand', 0.017020592061497097),\n",
       "  ('record', 0.016836832337154956),\n",
       "  ('estimation', 0.01678028131415901),\n",
       "  ('mobile', 0.016732011987272987),\n",
       "  ('paper', 0.01649886752431999),\n",
       "  ('search', 0.016306074116852705),\n",
       "  ('propose', 0.016183543600854496),\n",
       "  ('approach', 0.016156146958526282),\n",
       "  ('clap', 0.015236446874201743),\n",
       "  ('background', 0.015092925496003443),\n",
       "  ('feature', 0.015049284934393161),\n",
       "  ('error', 0.014859276359698206),\n",
       "  ('kinect', 0.014470331179065911),\n",
       "  ('map', 0.014435234533051832),\n",
       "  ('emd', 0.014093195934441078),\n",
       "  ('spectral', 0.013865593421942208),\n",
       "  ('distance', 0.013633827104717812),\n",
       "  ('guide', 0.013427269204941996),\n",
       "  ('wsn', 0.013398915723026839),\n",
       "  ('robust', 0.012899387086622712),\n",
       "  ('estimate', 0.012686767142008792),\n",
       "  ('parametric', 0.012461031399639633),\n",
       "  ('algorithm', 0.01244108254818541),\n",
       "  ('result', 0.012214815482956998),\n",
       "  ('single', 0.012047846508307987),\n",
       "  ('calibrate', 0.011916272181937573),\n",
       "  ('motion', 0.011879902458909762),\n",
       "  ('study', 0.011728274034749717),\n",
       "  ('perception', 0.01170995180240127),\n",
       "  ('twosensor', 0.011347061374331396),\n",
       "  ('speech', 0.011144268779102705),\n",
       "  ('experiment', 0.011072738474239067),\n",
       "  ('denoise', 0.01099817932729943),\n",
       "  ('performance', 0.01099612162229466),\n",
       "  ('move', 0.01084896180722711),\n",
       "  ('voice', 0.010837403332337622),\n",
       "  ('servo', 0.010730402511777069),\n",
       "  ('enhance', 0.01054435843955043),\n",
       "  ('correlation', 0.010523521313824486),\n",
       "  ('cerebellar', 0.010319550680970152),\n",
       "  ('neural', 0.010096389380559685),\n",
       "  ('maximum', 0.010082273887725653),\n",
       "  ('sensorial', 0.009771497505320291),\n",
       "  ('improve', 0.009681088953336702),\n",
       "  ('process', 0.00947628750025066),\n",
       "  ('location', 0.009317756638201547),\n",
       "  ('recognize', 0.009310825739223828),\n",
       "  ('receive', 0.009285053644153675),\n",
       "  ('context', 0.009226318214311767),\n",
       "  ('efficient', 0.009175600743066675),\n",
       "  ('accord', 0.009158064555324929),\n",
       "  ('guidance', 0.009129891994114757),\n",
       "  ('sensorbased', 0.009091194140266014),\n",
       "  ('wireless', 0.009089218069811875),\n",
       "  ('test', 0.008997649126265606),\n",
       "  ('model', 0.008944965431583553),\n",
       "  ('design', 0.00894266597914776),\n",
       "  ('accurate', 0.008891590102074381),\n",
       "  ('difference', 0.008795401318742272),\n",
       "  ('transform', 0.008776030007380854),\n",
       "  ('geometrical', 0.008706743238920787),\n",
       "  ('noise', 0.008616388054528122),\n",
       "  ('decision', 0.008508128148070788),\n",
       "  ('theta', 0.008403634985997981)],\n",
       " 23: [('spacecraft', 0.10353266912865225),\n",
       "  ('space', 0.10267670978028061),\n",
       "  ('satellite', 0.06432871191091455),\n",
       "  ('dynamic', 0.05984688331984464),\n",
       "  ('dock', 0.05806493816608114),\n",
       "  ('mission', 0.05589783762219425),\n",
       "  ('capture', 0.053297423219684004),\n",
       "  ('simulation', 0.048962687423582986),\n",
       "  ('quaternion', 0.04745541000540558),\n",
       "  ('rendezvous', 0.04465692946292135),\n",
       "  ('hardwareintheloop', 0.04362771918078629),\n",
       "  ('onorbit', 0.04155105027398942),\n",
       "  ('flexible', 0.03889815672863896),\n",
       "  ('hil', 0.03853065993998196),\n",
       "  ('facility', 0.037705166166754976),\n",
       "  ('freeflying', 0.03623855125413816),\n",
       "  ('model', 0.03272300013732042),\n",
       "  ('tether', 0.031504577925465425),\n",
       "  ('dual', 0.030585081443036906),\n",
       "  ('control', 0.02994185662844192),\n",
       "  ('compound', 0.028806510461770105),\n",
       "  ('simulate', 0.02616268237506082),\n",
       "  ('contact', 0.025882745776582065),\n",
       "  ('system', 0.025427872988617137),\n",
       "  ('launch', 0.024500075510702372),\n",
       "  ('approaching', 0.022741062960146406),\n",
       "  ('rvd', 0.022741062960146406),\n",
       "  ('flexiblebase', 0.022741062960146406),\n",
       "  ('servicing', 0.02218152759344766),\n",
       "  ('robot', 0.021891167479683876),\n",
       "  ('arm', 0.02145118493097111),\n",
       "  ('roboticsbased', 0.021003051950310284),\n",
       "  ('maneuvering', 0.02070774357379324),\n",
       "  ('verify', 0.02015766339349236),\n",
       "  ('paper', 0.02006758808600676),\n",
       "  ('risky', 0.019986500649969936),\n",
       "  ('physically', 0.019691732546666337),\n",
       "  ('target', 0.019634618169459356),\n",
       "  ('topology', 0.018172953685473798),\n",
       "  ('convex', 0.017774732007001907),\n",
       "  ('carefully', 0.01768989337894428),\n",
       "  ('tetherbased', 0.01759683781154151),\n",
       "  ('dockingcapturing', 0.01759683781154151),\n",
       "  ('impact', 0.017359774056436815),\n",
       "  ('onorbital', 0.017055797220109803),\n",
       "  ('difficulty', 0.016761642913993593),\n",
       "  ('industrial', 0.01653144454525252),\n",
       "  ('operation', 0.01642770752591733),\n",
       "  ('recursive', 0.016340489453688635),\n",
       "  ('orbital', 0.015752288962732713),\n",
       "  ('manipulator', 0.01550028410942966),\n",
       "  ('challenge', 0.015407899580614327),\n",
       "  ('representation', 0.015327827393271183),\n",
       "  ('panel', 0.015233742519094125),\n",
       "  ('experiment', 0.01471836199697107),\n",
       "  ('extendable', 0.014335024171023636),\n",
       "  ('program', 0.014148282597154446),\n",
       "  ('singlearm', 0.013937794365766287),\n",
       "  ('strategy', 0.013903798114017879),\n",
       "  ('entire', 0.01366233839201909),\n",
       "  ('autonomously', 0.013379423893285801),\n",
       "  ('solve', 0.013348188296296852),\n",
       "  ('unit', 0.013347435417445019),\n",
       "  ('method', 0.013310923760633973),\n",
       "  ('service', 0.01308025303946229),\n",
       "  ('formulation', 0.013018362132328896),\n",
       "  ('admittance', 0.012823234987391805),\n",
       "  ('final', 0.012706890052035298),\n",
       "  ('guidance', 0.01258532238102005),\n",
       "  ('reliable', 0.01256384659189059),\n",
       "  ('develop', 0.012520053993195703),\n",
       "  ('selfreconfigurable', 0.012345647340758617),\n",
       "  ('base', 0.0119174769989486),\n",
       "  ('propose', 0.011810435580811683),\n",
       "  ('adam', 0.011789973511458407),\n",
       "  ('systemwide', 0.01173122520769434),\n",
       "  ('safe', 0.011690423148496),\n",
       "  ('capable', 0.01163844157031192),\n",
       "  ('closedloop', 0.011530619596523477),\n",
       "  ('mechanical', 0.011477395626342635),\n",
       "  ('resolve', 0.01144891194362857),\n",
       "  ('analysis', 0.011426334373402994),\n",
       "  ('numerical', 0.011398343715810335),\n",
       "  ('jourdain', 0.011370531480073203),\n",
       "  ('microgravity', 0.011370531480073203),\n",
       "  ('modeling', 0.01130869661182789),\n",
       "  ('ground', 0.011296039083114143),\n",
       "  ('maneuver', 0.011267914709744283),\n",
       "  ('repair', 0.011204312285281967),\n",
       "  ('flight', 0.011122738417030023),\n",
       "  ('sfunction', 0.01109076379672383),\n",
       "  ('hertz', 0.01109076379672383),\n",
       "  ('ensure', 0.011047052488003159),\n",
       "  ('perform', 0.010915853173744034),\n",
       "  ('impactcontact', 0.010862183566276606),\n",
       "  ('calculation', 0.010672988836667202),\n",
       "  ('appendage', 0.010668927318445003),\n",
       "  ('multiarm', 0.01035387178689662),\n",
       "  ('reserve', 0.010344425665134466),\n",
       "  ('suppress', 0.010336264238020854)],\n",
       " 24: [('gas', 0.26799538583900506),\n",
       "  ('odor', 0.2061222932253746),\n",
       "  ('source', 0.12686802889830362),\n",
       "  ('sensor', 0.07999670724755382),\n",
       "  ('olfactory', 0.06436188184169638),\n",
       "  ('plume', 0.06385419703549926),\n",
       "  ('mox', 0.05723243902459972),\n",
       "  ('chemical', 0.05190085371251944),\n",
       "  ('mobile', 0.05173672950527103),\n",
       "  ('rgo', 0.04447331822289077),\n",
       "  ('plasmon', 0.0400955928913763),\n",
       "  ('insect', 0.037644689770573316),\n",
       "  ('localization', 0.037536009642714946),\n",
       "  ('response', 0.03667804128239341),\n",
       "  ('search', 0.03448155452512197),\n",
       "  ('oxide', 0.03414911273403524),\n",
       "  ('resonance', 0.03328322385268824),\n",
       "  ('localize', 0.03272276497327285),\n",
       "  ('concentration', 0.03218094092084819),\n",
       "  ('lspr', 0.031104457429463533),\n",
       "  ('ethanol', 0.031104457429463533),\n",
       "  ('equip', 0.02976979153086939),\n",
       "  ('olfaction', 0.029648878815260515),\n",
       "  ('sense', 0.028881801480158998),\n",
       "  ('robot', 0.027751861077368916),\n",
       "  ('tdlas', 0.026465841196550727),\n",
       "  ('time', 0.02646204125936999),\n",
       "  ('speed', 0.026361707010150063),\n",
       "  ('infotaxis', 0.025459214651286324),\n",
       "  ('visualization', 0.024728456785303866),\n",
       "  ('dispersion', 0.024707399012717093),\n",
       "  ('onground', 0.021706759677698095),\n",
       "  ('silkmoth', 0.021706759677698095),\n",
       "  ('taste', 0.021706759677698095),\n",
       "  ('distribution', 0.020780013697071616),\n",
       "  ('track', 0.020369845075858956),\n",
       "  ('map', 0.020350262242457444),\n",
       "  ('invisible', 0.02004779644568815),\n",
       "  ('sample', 0.019991745397960236),\n",
       "  ('leak', 0.019765919210173677),\n",
       "  ('hazardous', 0.019188415525491602),\n",
       "  ('site', 0.01853244375325557),\n",
       "  ('base', 0.018011128089623844),\n",
       "  ('wind', 0.0179257170975884),\n",
       "  ('min', 0.01785522926330497),\n",
       "  ('surface', 0.017261348618570673),\n",
       "  ('strategy', 0.017063265959367926),\n",
       "  ('pheromone', 0.01696640989453506),\n",
       "  ('acetone', 0.016796502878162006),\n",
       "  ('silkmoths', 0.016796502878162006),\n",
       "  ('crossover', 0.0166573817099591),\n",
       "  ('detection', 0.016425592663246065),\n",
       "  ('lii', 0.01628006975827357),\n",
       "  ('spatial', 0.016222797010390446),\n",
       "  ('measurement', 0.016156734437706387),\n",
       "  ('detect', 0.016118415747915674),\n",
       "  ('environment', 0.01591936162398683),\n",
       "  ('inspire', 0.01562878785852679),\n",
       "  ('module', 0.0153869086506899),\n",
       "  ('ion', 0.015275528790771795),\n",
       "  ('metal', 0.015149800700208773),\n",
       "  ('leakage', 0.015035847334266113),\n",
       "  ('substance', 0.015035847334266113),\n",
       "  ('recovery', 0.014695031798973166),\n",
       "  ('trace', 0.014570927229273943),\n",
       "  ('location', 0.01379262181004879),\n",
       "  ('multi', 0.01345666475266348),\n",
       "  ('trail', 0.013303879122320304),\n",
       "  ('discrimination', 0.012991063766449958),\n",
       "  ('unit', 0.012740370730595335),\n",
       "  ('versus', 0.012724807420901294),\n",
       "  ('experiment', 0.01248795126546651),\n",
       "  ('consumption', 0.012357964400939768),\n",
       "  ('robotic', 0.012341051926883676),\n",
       "  ('direction', 0.012296316094057218),\n",
       "  ('algorithm', 0.012277286129238623),\n",
       "  ('recognition', 0.011713676267848736),\n",
       "  ('fuzzy', 0.01165807409377335),\n",
       "  ('remote', 0.011513754702585168),\n",
       "  ('capability', 0.011509283175277187),\n",
       "  ('trial', 0.011421115819350727),\n",
       "  ('slow', 0.011391491897342239),\n",
       "  ('wireless', 0.011211939405385831),\n",
       "  ('moth', 0.011197668585441337),\n",
       "  ('result', 0.010958180039930411),\n",
       "  ('predict', 0.010914040009050096),\n",
       "  ('logic', 0.010850370057647067),\n",
       "  ('tunable', 0.010586336478620291),\n",
       "  ('declaration', 0.010586336478620291),\n",
       "  ('absorption', 0.010586336478620291),\n",
       "  ('leave', 0.01056060916959554),\n",
       "  ('develop', 0.010456792551917265),\n",
       "  ('robotics', 0.010365068940515615),\n",
       "  ('condition', 0.010286035090453312),\n",
       "  ('close', 0.01017341837793922),\n",
       "  ('application', 0.010082548197946498),\n",
       "  ('pde', 0.009882959605086838),\n",
       "  ('diode', 0.009882959605086838),\n",
       "  ('discriminate', 0.009642848226375319),\n",
       "  ('behaviour', 0.009610372914398577)],\n",
       " 25: [('lcd', 0.16005152848527923),\n",
       "  ('glass', 0.13781564510784838),\n",
       "  ('glasshandling', 0.08070368781039558),\n",
       "  ('rga', 0.06152132388059123),\n",
       "  ('clean', 0.05887696695741364),\n",
       "  ('deflection', 0.05811787894341883),\n",
       "  ('substrate', 0.05373753194699719),\n",
       "  ('transfer', 0.05271043756631884),\n",
       "  ('window', 0.042822536321715336),\n",
       "  ('mother', 0.042195193298083446),\n",
       "  ('realcoded', 0.04177155919894152),\n",
       "  ('display', 0.040642123621000205),\n",
       "  ('static', 0.040092936277177464),\n",
       "  ('suction', 0.03976326410455031),\n",
       "  ('ffs', 0.03941713220067454),\n",
       "  ('robot', 0.03502328731613264),\n",
       "  ('windowcleaning', 0.03439811274959203),\n",
       "  ('gtr', 0.03439811274959203),\n",
       "  ('fpd', 0.03439811274959203),\n",
       "  ('belt', 0.03359396948680147),\n",
       "  ('compensation', 0.029494310156831422),\n",
       "  ('genetic', 0.029432010654149052),\n",
       "  ('ltr', 0.029268312799097463),\n",
       "  ('module', 0.02917068093633676),\n",
       "  ('cleaning', 0.02842800432333477),\n",
       "  ('algorithm', 0.02828610346618925),\n",
       "  ('dynamic', 0.02807729359369136),\n",
       "  ('identify', 0.026110103806505417),\n",
       "  ('design', 0.026025071607526415),\n",
       "  ('system', 0.025214711909074348),\n",
       "  ('arm', 0.024530681642603466),\n",
       "  ('panel', 0.024120932479770145),\n",
       "  ('vertical', 0.02324869695302595),\n",
       "  ('pmsm', 0.022560180680443336),\n",
       "  ('identification', 0.02191468700453503),\n",
       "  ('method', 0.021544727031054808),\n",
       "  ('crystal', 0.021097596649041723),\n",
       "  ('facade', 0.020336334415708545),\n",
       "  ('improve', 0.019369652826447654),\n",
       "  ('equation', 0.019204484681360837),\n",
       "  ('experiment', 0.018989165470759427),\n",
       "  ('path', 0.018543287021362393),\n",
       "  ('accuracy', 0.0181935824548686),\n",
       "  ('model', 0.018021990119653348),\n",
       "  ('vibration', 0.017296314529391562),\n",
       "  ('balance', 0.01697874391813659),\n",
       "  ('paper', 0.016946553539208885),\n",
       "  ('liquid', 0.016930259446153638),\n",
       "  ('simulation', 0.016797507010721264),\n",
       "  ('generation', 0.016641580710215167),\n",
       "  ('propose', 0.01662267350663546),\n",
       "  ('scara', 0.01654978172331747),\n",
       "  ('fork', 0.016185071583220068),\n",
       "  ('analysis', 0.016082067792259232),\n",
       "  ('flat', 0.015920513576697336),\n",
       "  ('performance', 0.015000500128361925),\n",
       "  ('stress', 0.014511225566832974),\n",
       "  ('increase', 0.014084979377421822),\n",
       "  ('motor', 0.013866604905697685),\n",
       "  ('drive', 0.013756524569896485),\n",
       "  ('heavy', 0.013365899350930301),\n",
       "  ('result', 0.013330397572068888),\n",
       "  ('semiconductor', 0.013290966145903983),\n",
       "  ('energy', 0.013273076971791272),\n",
       "  ('stack', 0.013031970554937123),\n",
       "  ('demand', 0.012884688922020365),\n",
       "  ('verify', 0.012766964836248966),\n",
       "  ('magnet', 0.012732167707384435),\n",
       "  ('permanent', 0.012630499360777673),\n",
       "  ('axis', 0.012388294052053316),\n",
       "  ('dirt', 0.012383391268214741),\n",
       "  ('compensate', 0.012285449572897096),\n",
       "  ('fitness', 0.012269196350726241),\n",
       "  ('fatigue', 0.012269196350726241),\n",
       "  ('parameter', 0.012104558855217754),\n",
       "  ('reactionbased', 0.011707325119638986),\n",
       "  ('develop', 0.011564063768533257),\n",
       "  ('elasticity', 0.011429907803954512),\n",
       "  ('synchronous', 0.01135921989519991),\n",
       "  ('realtime', 0.011336545133706941),\n",
       "  ('commercialize', 0.011262037771621297),\n",
       "  ('speed', 0.01121275070354853),\n",
       "  ('size', 0.01120943011614391),\n",
       "  ('real', 0.011008602303091355),\n",
       "  ('maximum', 0.011003090430747585),\n",
       "  ('formulation', 0.010993666499570929),\n",
       "  ('require', 0.010689903390812728),\n",
       "  ('structural', 0.010565850981049821),\n",
       "  ('passively', 0.010168167207854273),\n",
       "  ('reliable', 0.009946725006981546),\n",
       "  ('cluster', 0.009929869033990481),\n",
       "  ('scale', 0.009913156867037708),\n",
       "  ('test', 0.0098194066242303),\n",
       "  ('flexible', 0.009776332290532782),\n",
       "  ('apply', 0.00970001277486035),\n",
       "  ('numerical', 0.0096256032967399),\n",
       "  ('independent', 0.009508686594442952),\n",
       "  ('meet', 0.009455294873227781),\n",
       "  ('hamilton', 0.009427902381649181),\n",
       "  ('footprint', 0.009427902381649181)],\n",
       " 26: [('eeg', 0.09923768903117491),\n",
       "  ('brain', 0.09811614670149701),\n",
       "  ('bci', 0.0717128051955003),\n",
       "  ('movement', 0.05840569651306486),\n",
       "  ('brainwave', 0.05661028509779056),\n",
       "  ('facial', 0.055108163944172124),\n",
       "  ('interface', 0.051527146268582374),\n",
       "  ('human', 0.045180488214786735),\n",
       "  ('activity', 0.04450875603451425),\n",
       "  ('braincomputer', 0.04361961961034492),\n",
       "  ('expression', 0.0414072349584098),\n",
       "  ('emotiv', 0.038389254027288426),\n",
       "  ('operator', 0.03590214645348419),\n",
       "  ('interaction', 0.03582577857871452),\n",
       "  ('action', 0.033926427358285834),\n",
       "  ('command', 0.03151391816755718),\n",
       "  ('brainactuated', 0.031486107136661036),\n",
       "  ('electroencephalograph', 0.031486107136661036),\n",
       "  ('robot', 0.029835801380697077),\n",
       "  ('mobile', 0.028740716423972034),\n",
       "  ('subject', 0.028720067099035865),\n",
       "  ('wave', 0.028658520917854483),\n",
       "  ('user', 0.028628820439522792),\n",
       "  ('humanrobot', 0.028562343936210877),\n",
       "  ('eog', 0.025730071774765308),\n",
       "  ('eye', 0.024831859464188463),\n",
       "  ('control', 0.02444838431299839),\n",
       "  ('electroencephalogram', 0.02436367735191728),\n",
       "  ('brainmachine', 0.02436367735191728),\n",
       "  ('bmi', 0.02436367735191728),\n",
       "  ('record', 0.024100639343722675),\n",
       "  ('mental', 0.023957771902855154),\n",
       "  ('computer', 0.023872270261482864),\n",
       "  ('data', 0.02337058824633655),\n",
       "  ('signal', 0.02324788673368627),\n",
       "  ('laban', 0.023033552416373053),\n",
       "  ('scan', 0.022359880633144435),\n",
       "  ('set', 0.022218098326967615),\n",
       "  ('cortex', 0.021503158203255344),\n",
       "  ('emotion', 0.020722583028506505),\n",
       "  ('session', 0.020005339389411205),\n",
       "  ('cognitive', 0.019546740091702614),\n",
       "  ('track', 0.018994425849196608),\n",
       "  ('zigbee', 0.01812140939931097),\n",
       "  ('manipulator', 0.018072334177295545),\n",
       "  ('behavior', 0.01793485690818491),\n",
       "  ('result', 0.017484575287670216),\n",
       "  ('event', 0.01743995508241664),\n",
       "  ('partner', 0.0170406126267987),\n",
       "  ('behavioral', 0.016792783825474444),\n",
       "  ('emotional', 0.016610260029880447),\n",
       "  ('mode', 0.016445083065463578),\n",
       "  ('govern', 0.016439733533599152),\n",
       "  ('epoch', 0.016242451567944856),\n",
       "  ('electroencephalography', 0.016242451567944856),\n",
       "  ('decision', 0.01623831402334344),\n",
       "  ('cell', 0.015906775836824497),\n",
       "  ('participant', 0.015851575130284346),\n",
       "  ('analysis', 0.015820315386786264),\n",
       "  ('faster', 0.01563100708473473),\n",
       "  ('paradigm', 0.015541937271379879),\n",
       "  ('test', 0.015455336884595815),\n",
       "  ('electrooculography', 0.01535570161091537),\n",
       "  ('industrial', 0.015259059056526487),\n",
       "  ('attempt', 0.015137449471256892),\n",
       "  ('model', 0.014773886214624679),\n",
       "  ('study', 0.014689612324556857),\n",
       "  ('probability', 0.014329260458927242),\n",
       "  ('exploratory', 0.01415257127444764),\n",
       "  ('alpha', 0.013987152245028783),\n",
       "  ('watch', 0.013987152245028783),\n",
       "  ('life', 0.013924385649906135),\n",
       "  ('processing', 0.013725491694261746),\n",
       "  ('social', 0.013714574506306268),\n",
       "  ('steer', 0.013671753492387518),\n",
       "  ('associate', 0.013671753492387518),\n",
       "  ('training', 0.01364359640572686),\n",
       "  ('recognition', 0.01359274516914947),\n",
       "  ('process', 0.013564581673535882),\n",
       "  ('humanhuman', 0.01323169187082332),\n",
       "  ('communication', 0.013193491410696274),\n",
       "  ('simple', 0.01305532598308516),\n",
       "  ('relax', 0.012865035887382654),\n",
       "  ('ball', 0.012864317825322798),\n",
       "  ('difference', 0.012589945116845492),\n",
       "  ('electrode', 0.012562539093598307),\n",
       "  ('band', 0.012562539093598307),\n",
       "  ('embody', 0.012494497588829673),\n",
       "  ('comfortable', 0.012429026195763552),\n",
       "  ('build', 0.012405904699652172),\n",
       "  ('relate', 0.01240186679986734),\n",
       "  ('increase', 0.012316205925511789),\n",
       "  ('sensor', 0.012214409522173102),\n",
       "  ('queue', 0.01193002817563617),\n",
       "  ('train', 0.011922912317539329),\n",
       "  ('motion', 0.011903621014166267),\n",
       "  ('cognition', 0.011791215123003095),\n",
       "  ('fluctuation', 0.011704491456655922),\n",
       "  ('reach', 0.011645078232475759),\n",
       "  ('neural', 0.011561768117043696)]}"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 4查看每一个主题的关键词\n",
    "new_topic.get_topics()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "c817a34e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 保存主题、关键词\n",
    "topic_keywords = new_topic.get_topics()\n",
    "import pickle\n",
    "# with open(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\3主题—主题词.pkl','wb') as f:\n",
    "#     pickle.dump(topic_keywords, f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "aab6f219",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "28"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(topic_keywords)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "e324b078",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>-1</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>...</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(robot, 0.026376499869617136)</td>\n",
       "      <td>(robot, 0.02611381360816392)</td>\n",
       "      <td>(walk, 0.06959808010972622)</td>\n",
       "      <td>(cable, 0.1106704273207453)</td>\n",
       "      <td>(swarm, 0.11078415678924677)</td>\n",
       "      <td>(underwater, 0.10271185838794183)</td>\n",
       "      <td>(user, 0.0564364050235032)</td>\n",
       "      <td>(fault, 0.13538434308011485)</td>\n",
       "      <td>(finger, 0.14817110787950308)</td>\n",
       "      <td>(snake, 0.17155499451178313)</td>\n",
       "      <td>...</td>\n",
       "      <td>(selection, 0.14656130817714874)</td>\n",
       "      <td>(polish, 0.3709585117227751)</td>\n",
       "      <td>(rfid, 0.2828295129172781)</td>\n",
       "      <td>(pipe, 0.16087325198253763)</td>\n",
       "      <td>(dual, 0.20982023613610268)</td>\n",
       "      <td>(sound, 0.2039720117032136)</td>\n",
       "      <td>(spacecraft, 0.10353266912865225)</td>\n",
       "      <td>(gas, 0.26799538583900506)</td>\n",
       "      <td>(lcd, 0.16005152848527923)</td>\n",
       "      <td>(eeg, 0.09923768903117491)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(system, 0.019602844358412773)</td>\n",
       "      <td>(manipulator, 0.019882405928875697)</td>\n",
       "      <td>(gait, 0.04524301748155997)</td>\n",
       "      <td>(cabledriven, 0.08965552788162695)</td>\n",
       "      <td>(selfassembly, 0.0980838748068141)</td>\n",
       "      <td>(fish, 0.0763817040636249)</td>\n",
       "      <td>(social, 0.05510337389225523)</td>\n",
       "      <td>(diagnosis, 0.08407396224146682)</td>\n",
       "      <td>(grasp, 0.1473160079386677)</td>\n",
       "      <td>(snakelike, 0.10293732513494715)</td>\n",
       "      <td>...</td>\n",
       "      <td>(decision, 0.12302372921427442)</td>\n",
       "      <td>(surface, 0.13808160738015124)</td>\n",
       "      <td>(tag, 0.2039021214514439)</td>\n",
       "      <td>(pipeline, 0.10040608638440254)</td>\n",
       "      <td>(arm, 0.18159134803537477)</td>\n",
       "      <td>(source, 0.12320393558339657)</td>\n",
       "      <td>(space, 0.10267670978028061)</td>\n",
       "      <td>(odor, 0.2061222932253746)</td>\n",
       "      <td>(glass, 0.13781564510784838)</td>\n",
       "      <td>(brain, 0.09811614670149701)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(manipulator, 0.019545957655431875)</td>\n",
       "      <td>(model, 0.019008746411697468)</td>\n",
       "      <td>(humanoid, 0.0386168864873338)</td>\n",
       "      <td>(parallel, 0.046884419943110205)</td>\n",
       "      <td>(dock, 0.04211573904213635)</td>\n",
       "      <td>(water, 0.04651292206672343)</td>\n",
       "      <td>(interaction, 0.046902876822544674)</td>\n",
       "      <td>(industrial, 0.05908064736393618)</td>\n",
       "      <td>(hand, 0.13815220660815727)</td>\n",
       "      <td>(locomotion, 0.06610585345282648)</td>\n",
       "      <td>...</td>\n",
       "      <td>(mcdm, 0.07615554437562749)</td>\n",
       "      <td>(tool, 0.08522775098775269)</td>\n",
       "      <td>(localization, 0.08029862383617768)</td>\n",
       "      <td>(elbow, 0.06378832601721346)</td>\n",
       "      <td>(dualarm, 0.1483760010139947)</td>\n",
       "      <td>(auditory, 0.10266360196270272)</td>\n",
       "      <td>(satellite, 0.06432871191091455)</td>\n",
       "      <td>(source, 0.12686802889830362)</td>\n",
       "      <td>(glasshandling, 0.08070368781039558)</td>\n",
       "      <td>(bci, 0.0717128051955003)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(control, 0.018171058041411073)</td>\n",
       "      <td>(control, 0.018478220946041013)</td>\n",
       "      <td>(biped, 0.03495463344192838)</td>\n",
       "      <td>(cdpr, 0.03687876726566766)</td>\n",
       "      <td>(modular, 0.03972811293106171)</td>\n",
       "      <td>(model, 0.04535996670527364)</td>\n",
       "      <td>(emotion, 0.04630788363576907)</td>\n",
       "      <td>(signal, 0.03849202340781488)</td>\n",
       "      <td>(selfadaptive, 0.06310601690765782)</td>\n",
       "      <td>(gait, 0.041366539150684216)</td>\n",
       "      <td>...</td>\n",
       "      <td>(decisionmaking, 0.061239349815847006)</td>\n",
       "      <td>(removal, 0.05029834003621174)</td>\n",
       "      <td>(mobile, 0.0639961972455761)</td>\n",
       "      <td>(inpipe, 0.06261641521907699)</td>\n",
       "      <td>(provision, 0.07508014805757651)</td>\n",
       "      <td>(array, 0.09804732945667707)</td>\n",
       "      <td>(dynamic, 0.05984688331984464)</td>\n",
       "      <td>(sensor, 0.07999670724755382)</td>\n",
       "      <td>(rga, 0.06152132388059123)</td>\n",
       "      <td>(movement, 0.05840569651306486)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(model, 0.017441712038635107)</td>\n",
       "      <td>(system, 0.018106208922365457)</td>\n",
       "      <td>(leg, 0.03128893563291555)</td>\n",
       "      <td>(cdprs, 0.03263617325364518)</td>\n",
       "      <td>(robot, 0.03368764075204649)</td>\n",
       "      <td>(swim, 0.044492534609608864)</td>\n",
       "      <td>(language, 0.041562979648269625)</td>\n",
       "      <td>(maintenance, 0.03400158673387218)</td>\n",
       "      <td>(object, 0.05335985421214273)</td>\n",
       "      <td>(robot, 0.037000267177534525)</td>\n",
       "      <td>...</td>\n",
       "      <td>(fuzzy, 0.0589447603262979)</td>\n",
       "      <td>(aspheric, 0.04521768586766248)</td>\n",
       "      <td>(navigation, 0.062315673373697714)</td>\n",
       "      <td>(robot, 0.038262068834322094)</td>\n",
       "      <td>(industrial, 0.0625204920946316)</td>\n",
       "      <td>(microphone, 0.09601593295673111)</td>\n",
       "      <td>(dock, 0.05806493816608114)</td>\n",
       "      <td>(olfactory, 0.06436188184169638)</td>\n",
       "      <td>(clean, 0.05887696695741364)</td>\n",
       "      <td>(brainwave, 0.05661028509779056)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 28 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                   -1                                    0   \\\n",
       "0        (robot, 0.026376499869617136)         (robot, 0.02611381360816392)   \n",
       "1       (system, 0.019602844358412773)  (manipulator, 0.019882405928875697)   \n",
       "2  (manipulator, 0.019545957655431875)        (model, 0.019008746411697468)   \n",
       "3      (control, 0.018171058041411073)      (control, 0.018478220946041013)   \n",
       "4        (model, 0.017441712038635107)       (system, 0.018106208922365457)   \n",
       "\n",
       "                               1                                   2   \\\n",
       "0     (walk, 0.06959808010972622)         (cable, 0.1106704273207453)   \n",
       "1     (gait, 0.04524301748155997)  (cabledriven, 0.08965552788162695)   \n",
       "2  (humanoid, 0.0386168864873338)    (parallel, 0.046884419943110205)   \n",
       "3    (biped, 0.03495463344192838)         (cdpr, 0.03687876726566766)   \n",
       "4      (leg, 0.03128893563291555)        (cdprs, 0.03263617325364518)   \n",
       "\n",
       "                                   3                                  4   \\\n",
       "0        (swarm, 0.11078415678924677)  (underwater, 0.10271185838794183)   \n",
       "1  (selfassembly, 0.0980838748068141)         (fish, 0.0763817040636249)   \n",
       "2         (dock, 0.04211573904213635)       (water, 0.04651292206672343)   \n",
       "3      (modular, 0.03972811293106171)       (model, 0.04535996670527364)   \n",
       "4        (robot, 0.03368764075204649)       (swim, 0.044492534609608864)   \n",
       "\n",
       "                                    5                                   6   \\\n",
       "0           (user, 0.0564364050235032)        (fault, 0.13538434308011485)   \n",
       "1        (social, 0.05510337389225523)    (diagnosis, 0.08407396224146682)   \n",
       "2  (interaction, 0.046902876822544674)   (industrial, 0.05908064736393618)   \n",
       "3       (emotion, 0.04630788363576907)       (signal, 0.03849202340781488)   \n",
       "4     (language, 0.041562979648269625)  (maintenance, 0.03400158673387218)   \n",
       "\n",
       "                                    7                                  8   \\\n",
       "0        (finger, 0.14817110787950308)       (snake, 0.17155499451178313)   \n",
       "1          (grasp, 0.1473160079386677)   (snakelike, 0.10293732513494715)   \n",
       "2          (hand, 0.13815220660815727)  (locomotion, 0.06610585345282648)   \n",
       "3  (selfadaptive, 0.06310601690765782)       (gait, 0.041366539150684216)   \n",
       "4        (object, 0.05335985421214273)      (robot, 0.037000267177534525)   \n",
       "\n",
       "   ...                                      17  \\\n",
       "0  ...        (selection, 0.14656130817714874)   \n",
       "1  ...         (decision, 0.12302372921427442)   \n",
       "2  ...             (mcdm, 0.07615554437562749)   \n",
       "3  ...  (decisionmaking, 0.061239349815847006)   \n",
       "4  ...             (fuzzy, 0.0589447603262979)   \n",
       "\n",
       "                                18                                   19  \\\n",
       "0     (polish, 0.3709585117227751)           (rfid, 0.2828295129172781)   \n",
       "1   (surface, 0.13808160738015124)            (tag, 0.2039021214514439)   \n",
       "2      (tool, 0.08522775098775269)  (localization, 0.08029862383617768)   \n",
       "3   (removal, 0.05029834003621174)         (mobile, 0.0639961972455761)   \n",
       "4  (aspheric, 0.04521768586766248)   (navigation, 0.062315673373697714)   \n",
       "\n",
       "                                20                                21  \\\n",
       "0      (pipe, 0.16087325198253763)       (dual, 0.20982023613610268)   \n",
       "1  (pipeline, 0.10040608638440254)        (arm, 0.18159134803537477)   \n",
       "2     (elbow, 0.06378832601721346)     (dualarm, 0.1483760010139947)   \n",
       "3    (inpipe, 0.06261641521907699)  (provision, 0.07508014805757651)   \n",
       "4    (robot, 0.038262068834322094)  (industrial, 0.0625204920946316)   \n",
       "\n",
       "                                  22                                 23  \\\n",
       "0        (sound, 0.2039720117032136)  (spacecraft, 0.10353266912865225)   \n",
       "1      (source, 0.12320393558339657)       (space, 0.10267670978028061)   \n",
       "2    (auditory, 0.10266360196270272)   (satellite, 0.06432871191091455)   \n",
       "3       (array, 0.09804732945667707)     (dynamic, 0.05984688331984464)   \n",
       "4  (microphone, 0.09601593295673111)        (dock, 0.05806493816608114)   \n",
       "\n",
       "                                 24                                    25  \\\n",
       "0        (gas, 0.26799538583900506)            (lcd, 0.16005152848527923)   \n",
       "1        (odor, 0.2061222932253746)          (glass, 0.13781564510784838)   \n",
       "2     (source, 0.12686802889830362)  (glasshandling, 0.08070368781039558)   \n",
       "3     (sensor, 0.07999670724755382)            (rga, 0.06152132388059123)   \n",
       "4  (olfactory, 0.06436188184169638)          (clean, 0.05887696695741364)   \n",
       "\n",
       "                                 26  \n",
       "0        (eeg, 0.09923768903117491)  \n",
       "1      (brain, 0.09811614670149701)  \n",
       "2         (bci, 0.0717128051955003)  \n",
       "3   (movement, 0.05840569651306486)  \n",
       "4  (brainwave, 0.05661028509779056)  \n",
       "\n",
       "[5 rows x 28 columns]"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "DF1 = pd.DataFrame(topic_keywords)\n",
    "DF1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "6fdbaa6c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# DF1.to_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\3主题-主题词概率.xlsx',index = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "1ebdda64",
   "metadata": {},
   "outputs": [],
   "source": [
    "dic = {}\n",
    "for k,v in topic_keywords.items():\n",
    "    ls = []\n",
    "    for i in v:\n",
    "        ls.append(i[0])\n",
    "    dic[k] = ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "22d78d34",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>-1</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>...</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>robot</td>\n",
       "      <td>robot</td>\n",
       "      <td>walk</td>\n",
       "      <td>cable</td>\n",
       "      <td>swarm</td>\n",
       "      <td>underwater</td>\n",
       "      <td>user</td>\n",
       "      <td>fault</td>\n",
       "      <td>finger</td>\n",
       "      <td>snake</td>\n",
       "      <td>...</td>\n",
       "      <td>selection</td>\n",
       "      <td>polish</td>\n",
       "      <td>rfid</td>\n",
       "      <td>pipe</td>\n",
       "      <td>dual</td>\n",
       "      <td>sound</td>\n",
       "      <td>spacecraft</td>\n",
       "      <td>gas</td>\n",
       "      <td>lcd</td>\n",
       "      <td>eeg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>system</td>\n",
       "      <td>manipulator</td>\n",
       "      <td>gait</td>\n",
       "      <td>cabledriven</td>\n",
       "      <td>selfassembly</td>\n",
       "      <td>fish</td>\n",
       "      <td>social</td>\n",
       "      <td>diagnosis</td>\n",
       "      <td>grasp</td>\n",
       "      <td>snakelike</td>\n",
       "      <td>...</td>\n",
       "      <td>decision</td>\n",
       "      <td>surface</td>\n",
       "      <td>tag</td>\n",
       "      <td>pipeline</td>\n",
       "      <td>arm</td>\n",
       "      <td>source</td>\n",
       "      <td>space</td>\n",
       "      <td>odor</td>\n",
       "      <td>glass</td>\n",
       "      <td>brain</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>manipulator</td>\n",
       "      <td>model</td>\n",
       "      <td>humanoid</td>\n",
       "      <td>parallel</td>\n",
       "      <td>dock</td>\n",
       "      <td>water</td>\n",
       "      <td>interaction</td>\n",
       "      <td>industrial</td>\n",
       "      <td>hand</td>\n",
       "      <td>locomotion</td>\n",
       "      <td>...</td>\n",
       "      <td>mcdm</td>\n",
       "      <td>tool</td>\n",
       "      <td>localization</td>\n",
       "      <td>elbow</td>\n",
       "      <td>dualarm</td>\n",
       "      <td>auditory</td>\n",
       "      <td>satellite</td>\n",
       "      <td>source</td>\n",
       "      <td>glasshandling</td>\n",
       "      <td>bci</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>control</td>\n",
       "      <td>control</td>\n",
       "      <td>biped</td>\n",
       "      <td>cdpr</td>\n",
       "      <td>modular</td>\n",
       "      <td>model</td>\n",
       "      <td>emotion</td>\n",
       "      <td>signal</td>\n",
       "      <td>selfadaptive</td>\n",
       "      <td>gait</td>\n",
       "      <td>...</td>\n",
       "      <td>decisionmaking</td>\n",
       "      <td>removal</td>\n",
       "      <td>mobile</td>\n",
       "      <td>inpipe</td>\n",
       "      <td>provision</td>\n",
       "      <td>array</td>\n",
       "      <td>dynamic</td>\n",
       "      <td>sensor</td>\n",
       "      <td>rga</td>\n",
       "      <td>movement</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>model</td>\n",
       "      <td>system</td>\n",
       "      <td>leg</td>\n",
       "      <td>cdprs</td>\n",
       "      <td>robot</td>\n",
       "      <td>swim</td>\n",
       "      <td>language</td>\n",
       "      <td>maintenance</td>\n",
       "      <td>object</td>\n",
       "      <td>robot</td>\n",
       "      <td>...</td>\n",
       "      <td>fuzzy</td>\n",
       "      <td>aspheric</td>\n",
       "      <td>navigation</td>\n",
       "      <td>robot</td>\n",
       "      <td>industrial</td>\n",
       "      <td>microphone</td>\n",
       "      <td>dock</td>\n",
       "      <td>olfactory</td>\n",
       "      <td>clean</td>\n",
       "      <td>brainwave</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 28 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           -1            0         1            2             3           4   \\\n",
       "0        robot        robot      walk        cable         swarm  underwater   \n",
       "1       system  manipulator      gait  cabledriven  selfassembly        fish   \n",
       "2  manipulator        model  humanoid     parallel          dock       water   \n",
       "3      control      control     biped         cdpr       modular       model   \n",
       "4        model       system       leg        cdprs         robot        swim   \n",
       "\n",
       "            5            6             7           8   ...              17  \\\n",
       "0         user        fault        finger       snake  ...       selection   \n",
       "1       social    diagnosis         grasp   snakelike  ...        decision   \n",
       "2  interaction   industrial          hand  locomotion  ...            mcdm   \n",
       "3      emotion       signal  selfadaptive        gait  ...  decisionmaking   \n",
       "4     language  maintenance        object       robot  ...           fuzzy   \n",
       "\n",
       "         18            19        20          21          22          23  \\\n",
       "0    polish          rfid      pipe        dual       sound  spacecraft   \n",
       "1   surface           tag  pipeline         arm      source       space   \n",
       "2      tool  localization     elbow     dualarm    auditory   satellite   \n",
       "3   removal        mobile    inpipe   provision       array     dynamic   \n",
       "4  aspheric    navigation     robot  industrial  microphone        dock   \n",
       "\n",
       "          24             25         26  \n",
       "0        gas            lcd        eeg  \n",
       "1       odor          glass      brain  \n",
       "2     source  glasshandling        bci  \n",
       "3     sensor            rga   movement  \n",
       "4  olfactory          clean  brainwave  \n",
       "\n",
       "[5 rows x 28 columns]"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "DF3 = pd.DataFrame(dic)\n",
    "DF3.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "8ceadebd",
   "metadata": {},
   "outputs": [],
   "source": [
    "# DF3.to_excel(r'D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\3主题-主题词.xlsx',index = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dd0ded55",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "ed11d592",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'calculate_probabilities': True,\n",
       " 'ctfidf_model': ClassTfidfTransformer(),\n",
       " 'embedding_model': <bertopic.backend._sentencetransformers.SentenceTransformerBackend at 0x1f80528eaa0>,\n",
       " 'hdbscan_model': HDBSCAN(min_cluster_size=10, prediction_data=True),\n",
       " 'language': 'english',\n",
       " 'low_memory': False,\n",
       " 'min_topic_size': 10,\n",
       " 'n_gram_range': (1, 1),\n",
       " 'nr_topics': 'auto',\n",
       " 'representation_model': None,\n",
       " 'seed_topic_list': None,\n",
       " 'top_n_words': 100,\n",
       " 'umap_model': UMAP(angular_rp_forest=True, low_memory=False, metric='cosine', min_dist=0.0, n_components=5, tqdm_kwds={'bar_format': '{desc}: {percentage:3.0f}%| {bar} {n_fmt}/{total_fmt} [{elapsed}]', 'desc': 'Epochs completed', 'disable': True}),\n",
       " 'vectorizer_model': CountVectorizer(),\n",
       " 'verbose': True}"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 5获取参数\n",
    "new_topic.get_params()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "b52f8da5",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "dee61284",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 6 保存模型\n",
    "new_topic.save(r\"D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\jichu_yanjiu_model\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "1927d992",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 7 加载模型\n",
    "model = BERTopic.load(r\"D:\\jupyter\\DK\\DK数据\\2数据处理\\3聚类\\1基础研究\\jichu_yanjiu_model\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "8fd79611",
   "metadata": {},
   "outputs": [],
   "source": [
    "# model.get_topics()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "72291138",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "93a9d527",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
